Forum Discussion

avidCoder's avatar
Super Contributor
7 years ago

How to use extent-report in Ready API tool?

I want to use extent-report for reporting purpose in ready api. I have downloaded extentreport jar file and added it in to external and lib folder of ready api. Can anybody give me basic code impleme...
  • VeJaay's avatar
    6 years ago

    Please find the steps : Download the Extent API Jars from the following path : and place it in the \bin\ext folder and try it


    Groovy code for extent report : 

    import com.relevantcodes.extentreports.ExtentReports; 
    import com.relevantcodes.extentreports.ExtentTest; 
    import java.text.SimpleDateFormat
    def date = new Date() 
    sdf = new SimpleDateFormat("dd_MM_yyyy_HHmmss") 
    def start_time = sdf.format(date) 
    def path = "D://report_001//SampleReport//API_Testing_"+start_time+".html" def LogStatus = com.relevantcodes.extentreports.LogStatus; def failedTestCase = 0; def extent = new ExtentReports(path,false) extent.addSystemInfo("Report Name", "TestReport").addSystemInfo("Report Type", "Automation Report"); runner.results.each {
    testCaseResult -> def name = name
    def extentTest = extent.startTest("$name", "$name") if(testCaseResult.status.toString() == 'FAILED') { failedTestCase++ extentTest.log(LogStatus.FAIL, } else { extentTest.log(LogStatus.PASS, } extent.endTest(extentTest); } extent.flush();


    Note : It worked for me in SOAP UI version 5.1 and greater ... not with older ones