11 years ago
TestSteps with xpath match fail using Java API
I struggle with different teststep results in Java and SoapUI concerning teststeps which use xpath matches.
In the SoapUI application the testrun is finished with no failures and when I use SoapUI via Maven Plugin (5.0.0) testcases fails when teststeps with xpath matches are used.
I've double checked if I use the wrong project file or call the wrong testcase.
This code works for testcases using only contains assertions:
What should I do to make xpath assertions work in the java project?
In the SoapUI application the testrun is finished with no failures and when I use SoapUI via Maven Plugin (5.0.0) testcases fails when teststeps with xpath matches are used.
I've double checked if I use the wrong project file or call the wrong testcase.
This code works for testcases using only contains assertions:
protected void checkTestCase(TestCase testCase) {
TestCaseRunner tr = testCase.run(null, false);
for (TestStepResult tcr : tr.getResults()) {
System.out.println("Teststep: " + tcr.getTestStep().getName() + ": " + tcr.getTimeTaken()
+ "ms, Status: " + tcr.getStatus().toString());
}
}
What should I do to make xpath assertions work in the java project?