在将 ReadyAPI 测试与 Java 代码集成时,如何设置授权?我得到错误:
#status# : HTTP/1.1 403 Forbidden in java console
SoapUIProTestCaseRunner runner = new SoapUIProTestCaseRunner();
runner.setProjectFile("C://APILOcal//activations.xml");
runner.setTestSuite("ServiceSOAP TestSuite");
runner.setTestCase("createContractBundle TestCase");
runner.setTestStepCount(3);
//runner.setGlobalProperties(new String[]{"Authorization: Basic admin=admin"});
//runner.setCustomHeaders(new String[]{"Authorization: Basic admin=admin"});
//runner.setUsername("admin");
//runner.setPassword("admin");
//runner.setWssPasswordType("PasswordText");
runner.run();
请指导。