0
votes

Getting java.lang.Exception: TestCase [testcase name] failed without assertions when trying to execute soap ui test case from eclipse

SOAPUI->Created a Testcase in soapUi and saved the project "testcase.xml"

eclipse->Created a new project and opened the saved project xml from step 1

Referred this tutorial https://selenium-qa.com/2018/03/23/soapui-with-bdd-cucumber/

Java code used to run the soap test case

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

When executing the above code i am getting below error.

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)
2

2 Answers

0
votes

Check the tutorial step 'add assertions', it seems like your test is lacking them.

0
votes

Directly Run soap project from java

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();