Forum Discussion
Manoj
12 years agoContributor
Hi All,
I am also trying to modify the JUnitReportCollector and have added to write the test step results when a Success happens.
I tried to modify the TestCase class to add the success, but failed ... If I add the "report.addTestCase" it only displays the Success on the "Status" and inside the "Type" it dose not print the step results. Would any one please guide how to add the step results details to the Success Test Case.
For the time being I have used the below step in (afterRun) and getting the required results , however the "Status" for a passed test case shows as "failure" (attached the screen shot ). I want the "Status" to show as Success
"
if (TestRunner.Status.FINISHED == testRunner.getStatus()) {
String msg = "";
if (this.status.containsKey(testCase))
{
msg = ((String)this.status.get(testCase)).toString();
}
report.addTestCaseWithFailure(testCase.getName(), testRunner.getTimeTaken(), "This is Added for PASSED TestCases" , msg);
}
"
Please let me know how to add this steps and what should go there in the successDocument file...
com.eviware.soapui.junit.SuccessDocument.Success success // please share what should go here .... and do we need to change the TestStep class too .....
// = testcase.addNewSuccess();
System.out.println("SUCCESS TO REPORT");
// report.addTestCase(testCase.getName(), testRunner.getTimeTaken());
Thanks,
manoj
I am also trying to modify the JUnitReportCollector and have added to write the test step results when a Success happens.
I tried to modify the TestCase class to add the success, but failed ... If I add the "report.addTestCase" it only displays the Success on the "Status" and inside the "Type" it dose not print the step results. Would any one please guide how to add the step results details to the Success Test Case.
For the time being I have used the below step in (afterRun) and getting the required results , however the "Status" for a passed test case shows as "failure" (attached the screen shot ). I want the "Status" to show as Success
"
if (TestRunner.Status.FINISHED == testRunner.getStatus()) {
String msg = "";
if (this.status.containsKey(testCase))
{
msg = ((String)this.status.get(testCase)).toString();
}
report.addTestCaseWithFailure(testCase.getName(), testRunner.getTimeTaken(), "This is Added for PASSED TestCases" , msg);
}
"
Please let me know how to add this steps and what should go there in the successDocument file...
com.eviware.soapui.junit.SuccessDocument.Success success // please share what should go here .... and do we need to change the TestStep class too .....
// = testcase.addNewSuccess();
System.out.println("SUCCESS TO REPORT");
// report.addTestCase(testCase.getName(), testRunner.getTimeTaken());
Thanks,
manoj