Ask a Question

How to use extent-report in Ready API tool?

Super Contributor

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 implementation for this?

SmartBear Alumni (Retired)

Hi @surendermcard,


The script works for me if I place it in the TearDown script on the Test Suite level.


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Occasional Contributor

@surendermcard : what is the error you are seeing while running it for project level?

Occasional Contributor

Hi, I am trying to generate to generate the extent report using the following code.

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();

But i am facing issue at the line

stating that "No such property"
Can any one please help me
Thanks in advance


Occasional Contributor

Place the code in the Tear Down suite of the Test Suite and you will not get this error. If you place in Project level Tear down you will face the error

Regular Contributor

How to get this work on Project Level, its working on TestSuite Level but required on Project level 

Occasional Contributor

To make it run at a project level , you must change the logic behind getting the report... My understanding is 

runner.results.each --- > This works only in suit level. So need to store the report params in a temp file and write them to the final report in the project level
Regular Contributor



Appreciate if you can share the code here for project level 

Occasional Contributor

@VeJaay , please share the code if possible for project level.

Occasional Contributor

Hey @surendermcard  and @678  I am trying the same. Will post if it turns out fine... Just on question though any specific reason to get the report at proejct level ? Coz I personally find it easy to maintin in the Suite level. I will get a working solution and update here.


If possible please list down what steps does your project have ?  Like Groovy SOAP /Rest , JDBC etc...

Occasional Contributor

@VeJaay , I want to place groovy script at just project level because my READYAPI project has different test suites so don't want to place groovy script for each test suite, instead just want to place script at project level so that it can generate report for all test suites(and test cases inside) in one go.

Following is the structure of the project:-


READYAPIProject(Groovy Script at this level)



                 TestStep1(Like SOAP/REST/JDBC etc. request)









I am also working on the groovy code at project level.


Showing results for 
Search instead for 
Did you mean: