How to use extent-report in Ready API tool?
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
see if the below link helps:
https://stackoverflow.com/questions/41576011/is-there-a-extent-reports-support-for-ready-api-soapui-...
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Have you tried with the extent-report in Ready API? Because I am also looking help for the extent report process in ReadyAPI for test result purpose
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can you please list down the steps to configure and generate Extenent Report ?
I have downloaded the extent report jars and placed them in the path.
Then added the following code in the Tear Down script :
import com.relevantcodes.extentreports.ExtentReports;
import com.relevantcodes.extentreports.ExtentTest;
import com.relevantcodes.extentreports.LogStatus;
def failedTestCase = 0;
def extent = new ExtentReports("D:\\report_001\\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)
}
}
But nothing happens. Not even a file is created in the location nor any error is thrown.
Thanks in advance.
VeJaay.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @kgbheem
Can you please help me out how you have implemented extent report with readapi tests.
If you can provide me the groovy code snippet that will help.
Thanks
Surender
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please find the steps : Download the Extent API Jars from the following path : https://jar-download.com/artifacts/com.relevantcodes/extentreports 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) log.info(start_time)
def path = "D://report_001//SampleReport//API_Testing_"+start_time+".html"
log.info(path) 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 = testCaseResult.testCase.name
log.info 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) } extent.endTest(extentTest); } extent.flush();
Note : It worked for me in SOAP UI version 5.1 and greater ... not with older ones
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have added the required jars and tried this groovy code ReadyAPI 2.6.0. Its throwing me following error at line 14 of groovy code which you provided i.e at 'runner.results.each {'
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I’m out of town. I will be back by Wednesday. We can connect on that day and fix it
Thanks
Bheem
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sure Bheem.
Thanks
Surender
