0
我正在使用SoapUi API編寫SOAP Web服務測試。我正在使用SoapUITestCaseRunner。
我的代碼看起來像SoapUI Web服務身份驗證編程方式
public class MyRunner extends SoapUITestCaseRunner{
public void runTest(){
setProjectFile("pro_file_path");
setEndpoint("endpoint");
setUsername("username");
setPassword("password");
setTestSuite("testSuiteName");
setTestCase("TestCaseName");
run();
}
}
public class MyTestClass(){
@Test
public void test(){
new MyRunner().runTest();
}
}
但用戶名和密碼也越來越爲屬性傳遞(我可以看到他們在JUnit故障日誌)。
服務說我401未經授權?我錯過了什麼?是否需要做任何事情來傳遞用戶名和密碼?