Forum Discussion

anieblas's avatar
15 years ago

soapui and testng

hello,I am using soapUI for testing web services . I am integrating SoapUI into my testng tests. I am using maven and java for the test managment.
I am getting an error when trying to run a simple testcase using TestRunner.
The test case works from the Soapui user interface.


I am using soapUI for testing web services and my soapUI test works fine (soapUI 3.6.1 no pro). I am integrating SoapUI into my testng tests. I am using maven and java for the test managment.



now the test:

import java.io.File;

import org.testng.Assert;
import org.testng.annotations.Test;

import com.eviware.soapui.tools.SoapUITestCaseRunner;

public class AppTest {
@Test(groups = {"availability"})
public void soapui() throws Exception {
SoapUITestCaseRunner runner = new SoapUITestCaseRunner();
runner.setHost("proyecto.actual");
runner.setProjectFile("src" + File.separatorChar + "test"
+ File.separatorChar + "soapui" + File.separatorChar
+ "test-soapui-project.xml");
runner.setTestSuite("ts1");
runner.setTestCase("tc1");
runner.run();
}
}

The log contains the following:

soapUI 3.6 TestCase Runner
10:13:02,791 WARN [DefaultSoapUICore] Missing folder [/home/aliuska/dev/xyma-sondeo-test/src/sondeo-test/availability/availability-sondeo-gesweb/./ext] for external libraries
10:13:02,792 INFO [DefaultSoapUICore] Creating new settings at [/home/aliuska/soapui-settings.xml]
10:13:02,799 INFO [WsdlProject] Loaded project from [file:/home/aliuska/dev/xyma-sondeo-test/src/sondeo-test/availability/availability-sondeo-gesweb/src/test/soapui/test-soapui-project.xml]
10:13:02,803 INFO [SoapUITestCaseRunner] Running soapUI tests in project [test]
10:13:02,804 INFO [SoapUITestCaseRunner] Running TestCase [tc2]
10:13:02,804 INFO [SoapUITestCaseRunner] Running soapUI testcase [tc2]
10:13:02,804 INFO [SoapUITestCaseRunner] running step [Test Request]
10:13:02,824 INFO [SoapUITestCaseRunner] Assertion [SOAP Response] has status FAILED
10:13:02,824 ERROR [SoapUITestCaseRunner] ASSERTION FAILED -> org/xmlsoap/schemas/soap/envelope/EnvelopeDocument
10:13:02,824 INFO [SoapUITestCaseRunner] Assertion [Schema Compliance] has status FAILED
10:13:02,825 ERROR [SoapUITestCaseRunner] ASSERTION FAILED -> org/xmlsoap/schemas/soap/envelope/EnvelopeDocument
10:13:02,827 INFO [SoapUITestCaseRunner] Assertion [Not SOAP Fault] has status VALID
10:13:02,827 ERROR [SoapUITestCaseRunner] Test Request failed, exporting to [/home/aliuska/dev/xyma-sondeo-test/src/sondeo-test/availability/availability-sondeo-gesweb/ts1-tc2-Test_Request-0-FAILED.txt]
10:13:02,856 INFO [SoapUITestCaseRunner] Finished running soapUI testcase [tc2], time taken: 19ms, status: FAILED
10:13:02,856 INFO [SoapUITestCaseRunner] TestCase [tc2] finished with status [FAILED] in 19ms

1 Reply

  • Hi,

    Are you trying to test JMS or HTTP end point?
    Please provide more information. Attach soapui-error.log file.

    Regards,
    Rohit Shingalapur