【问题标题】:java.lang.Exception: TestCase [Test case name] failed without assertionsjava.lang.Exception:TestCase [Test case name] 没有断言失败
【发布时间】:2019-05-23 12:06:01
【问题描述】:

Getting java.lang.Exception: TestCase [testcase name] 在尝试从 Eclipse 执行soap ui 测试用例时失败,没有断言

SOAPUI->在soapUi中创建了一个Testcase并保存了项目“testcase.xml”

eclipse->创建了一个新项目并打开了步骤1中保存的项目xml

参考本教程 https://selenium-qa.com/2018/03/23/soapui-with-bdd-cucumber/

用于运行soap测试用例的Java代码

SoapUITestCaseRunner SoapUITestCaseRunner= new SoapUITestCaseRunner();     
SoapUITestCaseRunner.setProjectFile("resource\\testcase.xml");   
SoapUITestCaseRunner.setTestSuite("TestSuite");
SoapUITestCaseRunner.setTestCase("TestCaseName");      
SoapUITestCaseRunner.run();

执行上述代码时,出现以下错误。

log4j:WARN No appenders could be found for logger (com.eviware.soapui.tools.SoapUITestCaseRunner).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

Exception in thread "main" java.lang.Exception: TestCase [testcasename] failed without assertions
    at com.eviware.soapui.tools.SoapUITestCaseRunner.run(SoapUITestCaseRunner.java:392)
    at soaptest.executeSOAP.main(executeSOAP.java:37)

【问题讨论】:

    标签: java selenium soap soapui


    【解决方案1】:

    检查教程步骤“添加断言”,您的测试似乎缺少它们。

    【讨论】:

      【解决方案2】:

      直接从java运行soap项目

      ProcessBuilder pb = new ProcessBuilder("cmd.exe", "/C", "Start","C:/Users/Soap.bat");
      System.out.println("T2");
      File dir = new File("C:\\Users\\ExpediaExamples");
      pb.directory(dir);
      Process p = pb.start();
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-10-31
        • 2019-02-02
        • 1970-01-01
        • 2022-12-22
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多