Forum Discussion

LeoDanny's avatar
LeoDanny
Occasional Contributor
6 years ago

Parameter type is not supported for Integrating Extent Report 3.1.0 with Test Complete

Hi,

I am trying to integrate Extent Report 3.1.0 with TC project. I have imported the jar files and the Java Classes of extent report. Below is the code to intiate Extent Report.

 

var reportLocation = Project.Path+ "ExtentReport\\AutomationReport.html";
var configFile = JavaClasses.java_io.File.newInstance(Project.Path + "ReportConfig.xml");
var LogStatus = JavaClasses.com_aventstack_extentreports.Status;

var htmlReporter =
JavaClasses.com_aventstack_extentreports_reporter.ExtentHtmlReporter.newInstance(reportLocation);

var extentReport = JavaClasses.com_aventstack_extentreports.ExtentReports.newInstance();
extentReport.attachReporter(htmlReporter);

 

But extentReport.attachReporter(htmlReporter) this line is throwing error as invalid argument exception. According to the blog  http://extentreports.com/docs/versions/3/java/  the parameter what I have given was correct. But TC/JavaScript is not supporting this parameter and it is expecting the type as JavaClasses.com_aventstack_extentreports_ExtentReporter. Seems like we have to modify the jar files of extent report 3.1.0. If any one can have faced this issue before please share some idea/contents to acheive this.

 

Thanks in Advance.

3 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Question:

     

    Where are you getting your documentation on including Extent Reports in TestComplete? Generally speaking, TestComplete can utilize JavaClasses and JAR files As-Is.  There isn't anything explicit about TestComplete and Extent Reports so anything having to do with which classes, objects, properties, etc., is something that comes from Extent Reports so should be addressed on that end.

    • LeoDanny's avatar
      LeoDanny
      Occasional Contributor

      There is no specific documentation on how to integrate extent report with test complete. I am follwing the steps from extent report site mentioned for Java Project. These jaf files and Java classes are working fine for selenium java and VisualStuidi c# but not with test complete.

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Then I think you need to contact SmartBear support directly.  They may be able to provide more expertise.  Generally speaking, TestComplete uses the JRE as it is installed on the machine and the JAR files and classes that you designate in JavaBridges for execution.  So, if there is something different, then it might be in how TestComplete interprets such things and they would better be able to answer that.