Forum Discussion

Krishna_Kumar's avatar
Krishna_Kumar
Contributor
6 years ago

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-TestComplete&sp=testcomplete

 

can anyone please help me

 

Regards,

Sathish Kumar K

 

  • AlexKaras's avatar
    AlexKaras
    6 years ago

    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?

     

  • tristaanogre's avatar
    tristaanogre
    6 years ago

    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.

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

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

    • Krishna_Kumar's avatar
      Krishna_Kumar
      Contributor

      tristaanogre ,

       

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

       

      Regards,

      Sathish Kumar k

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    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.

     

    • Krishna_Kumar's avatar
      Krishna_Kumar
      Contributor

      Hi AlexKaras ,

       

      sure i have attached the Java Bridge settings.

       

      Regards,

      Sathish Kumar K

       

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        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?