1

I want to generate Extent Reports for SoapUI tests. I do not want to use plain old frames based JUnit HTML Report that SoapUI offers. Does Extent Reports support this? An example would be nice. Thanks!

Craig
  • 7,471
  • 4
  • 29
  • 46

1 Answers1

3
import com.relevantcodes.extentreports.ExtentReports;
import com.relevantcodes.extentreports.ExtentTest;
import com.relevantcodes.extentreports.LogStatus;

def failedTestCase = 0;
def extent = new ExtentReports("C:\\SampleReport.html",true)
runner.results.each {
  testCaseResult -> def name = testCaseResult.testCase.name
  def extentTest = extent.startTest(name, name)
  if(testCaseResult.status.toString() == 'FAILED'){
    failedTestCase++
    extentTest.log(LogStatus.FAIL, testCaseResult.testCase.name)
  } else {
    extentTest.log(LogStatus.PASS, testCaseResult.testCase.name)
  }

}
Rao
  • 20,781
  • 11
  • 57
  • 77