Forum Discussion
NBorovykh
6 years agoModerator
Hi Hamza_amami,
Would you mind sharing the piece of your Java code where you invoke SoapUI OS classes so that we could advise what SoapUI Pro classes you need to use for achieving the same and what exact Maven dependencies should be included to your POM?
- Hamza_amami6 years agoOccasional Contributor
hank your for your answer: here's how I envoke soapui teststeps :
SoapUI.setSoapUICore(new StandaloneSoapUICore(true)); SoapUI.getSettings().setBoolean(HttpSettings.RESPONSE_COMPRESSION, false); WsdlProject project; try { project = new WsdlProject("SoapProjects/" + projectName); tSuite = project.getTestSuiteByName(defaultTestSuite); } catch (XmlException | IOException | SoapUIException e) { e.printStackTrace(); }
And
WsdlTestCase tc = tSuite.getTestCaseByName("name"); Map<String, String> params = new HashMap<String, String>() { { put("username","sss"); put("ApiVersion","1.0.0" ); put("env",env ); } };
And
for (int i = 0; i < tc.getTestStepCount(); i++) { System.out.println(tc.getTestStepCount()); WsdlTestStep ts = tc.getTestStepAt(i); String tsName = ts.getName(); if (!ts.isDisabled()) { WsdlTestCaseRunner runner = new WsdlTestCaseRunner(tc, new StringToObjectMap()); TestStepResult result = runner.runTestStep(ts); ....
By the way, I filter on disabled, but it execute them anyway
Thanks in advance
Related Content
- 3 years ago
- 4 years ago