Thomas_Fuller
16 years agoOccasional Contributor
JUnit integration not working
Hi,
I'm attempting to integrate one of my SoapUI projects with JUnit. I've been through a few of the examples and I'm convinced I'm missing something.
My code is all very closely based on what you've written here (and I've tried several examples):
http://www.soapui.org/userguide/command ... ntegration
For example:
SoapUITestCaseRunner runner = new SoapUITestCaseRunner();
runner.setProjectFile(
"./test-ws/SecurityServiceProject-soapui-project.xml"
);
runner.run ();
I have several of the test cases in this project working in SoapUI however when I run the suite from the within JUnit the (previously passing) tests fail.
The problem appears to be that not all of my test steps are being called. For example I have a test step that sets a user's detail in the database and then attempts to change it via a web service and then checks the database that it has actually been changed. The step to set the detail in the database is executed when I run the test in SoapUI however it appears to not be executed when I run the same test in JUnit hence the test fails.
Finally, I've even tried this using the test runner as follows:
testrunner.bat SecurityServiceProject-soapui-project.xml
and the results are that it is working fine.
I'm using SoapUI version 3.5.
Any idea what I've missed?
Thanks for your help,
Tom
I'm attempting to integrate one of my SoapUI projects with JUnit. I've been through a few of the examples and I'm convinced I'm missing something.
My code is all very closely based on what you've written here (and I've tried several examples):
http://www.soapui.org/userguide/command ... ntegration
For example:
SoapUITestCaseRunner runner = new SoapUITestCaseRunner();
runner.setProjectFile(
"./test-ws/SecurityServiceProject-soapui-project.xml"
);
runner.run ();
I have several of the test cases in this project working in SoapUI however when I run the suite from the within JUnit the (previously passing) tests fail.
The problem appears to be that not all of my test steps are being called. For example I have a test step that sets a user's detail in the database and then attempts to change it via a web service and then checks the database that it has actually been changed. The step to set the detail in the database is executed when I run the test in SoapUI however it appears to not be executed when I run the same test in JUnit hence the test fails.
Finally, I've even tried this using the test runner as follows:
testrunner.bat SecurityServiceProject-soapui-project.xml
and the results are that it is working fine.
I'm using SoapUI version 3.5.
Any idea what I've missed?
Thanks for your help,
Tom