harir12
7 years agoNew Contributor
Calling soapUI groovy script from Java
I am using soapui open source and am trying to run a soapui groovy script test step via Java. The groovy script opens a file to read data and then the appropriate test cases run. When i call this test step from Java, the call is successful, however the groovy script fails to read the file data and i am not able to run the test cases properly.
Could anyone please suggest a solution for this?
This is my java code :
WsdlProject project = new WsdlProject("Path to project");
WsdlTestCase testCase = project.getTestSuiteByName("...").getTestCaseByName("...");
WsdlTestStep testStep = testCase.getTestStepByName("<Script name>");
WsdlTestCaseRunner runner = new WsdlTestCaseRunner(testCase, new StringToObjectMap());
runner.runTestStep(testStep);