cancel
Showing results for 
Search instead for 
Did you mean: 

Error: Error while generating Extent Report in Test complete

SOLVED
Contributor

Error: Error while generating Extent Report in Test complete

Am trying to generate extent report with test complete.

Below are the configuration I tried,  but am getting an error.

Error:  "TypeError: Cannot read property 'ExtentReports' of undefined"

 

I tried following link:

https://smartbear-cc.force.com/portal/KbArticleViewer?name=How-to-integrate-ExtentReports-with-TestC...

 

can anyone please help me

 

Regards,

Sathish Kumar K

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Hero

Re: Error: Error while generating Extent Report in Test complete

Hi,

 

Well... At a glance:

-- The screenshot references com_relevantcodes_extentreports.ExtentReport class

-- While the error says about .ExtentReports

 

What if you change .ExtentReports to .ExtentReport ? Does it help?

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Community Hero

Re: Error: Error while generating Extent Report in Test complete

My guess is that it's a similar problem to what you already fixed... that you may have a typo or something that is misrepresenting the object in question.  You need to make sure that you are using the object as it is referenced by the TestComplete engine.  JavaBridge objects do have Intellisence capabilities so try and see what's available there.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
9 REPLIES 9
Community Hero

Re: Error: Error while generating Extent Report in Test complete

Do you have the JVM indicated under Tools | Options | Java Bridge?  You need that in addition to the JAR files from ExtentReport


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Contributor

Re: Error: Error while generating Extent Report in Test complete

@tristaanogre ,

 

that is already set and also i have attached the image , but still im getting the same error.

 

Regards,

Sathish Kumar k

Community Hero

Re: Error: Error while generating Extent Report in Test complete

Hi Satish,

 

Can you share Java Bridge settings and your code?

Basically, the Cannot read property 'ExtentReports'  means that the parent expression member was expected to be an object but did not appear to be such and thus an attempt to reference its property (.ExtentReports) failed.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Contributor

Re: Error: Error while generating Extent Report in Test complete

Hi @AlexKaras ,

 

sure i have attached the Java Bridge settings.

 

Regards,

Sathish Kumar K

 

Community Hero

Re: Error: Error while generating Extent Report in Test complete

Hi,

 

Well... At a glance:

-- The screenshot references com_relevantcodes_extentreports.ExtentReport class

-- While the error says about .ExtentReports

 

What if you change .ExtentReports to .ExtentReport ? Does it help?

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Contributor

Re: Error: Error while generating Extent Report in Test complete

i just now tried changing ExtentReports to .ExtentReport, but i am getting another error

 

"TypeError: Cannot read property 'relevantcodes' of undefined"
 
Regards,
Sathish Kumar K
Community Hero

Re: Error: Error while generating Extent Report in Test complete

For what line of code?

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Contributor

Re: Error: Error while generating Extent Report in Test complete

function Test() {

var extentReports = JavaClasses.com.relevantcodes.extentreports.ExtentReports
var logStatus = JavaClasses.com.relevantcodes.extentreports.LogStatus

var path = ".\\Generated ExtentReport\\report.html"

var extent = extentReports.newInstance(path);

var test = extent.startTest("Sample Test Report", "Sample description");

test.log(logStatus.INFO, "This step shows usage of log INFO");
test.log(logStatus.PASS, "This step shows usage of log PASS");
test.log(logStatus.FAIL, "This step shows usage of log FAIL");

extent.endTest(test);
extent.flush();
}

 

im using "extentreports-4.0.9" version of jar.

 

Regards,

Sathish Kumar K

Community Hero

Re: Error: Error while generating Extent Report in Test complete

My guess is that it's a similar problem to what you already fixed... that you may have a typo or something that is misrepresenting the object in question.  You need to make sure that you are using the object as it is referenced by the TestComplete engine.  JavaBridge objects do have Intellisence capabilities so try and see what's available there.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
New Here?
Join us and watch the welcome video:
Watch the New Interview
APITestingMistake#2