Search code examples
extentreportsselenium-extent-report

Can klove reporter (Extent Report) be customized using Config.xml file?


Can we use Config.xml to customize klov reporter ? I was trying this out using below code, but i don't see it working. Please take a look and let me know if i'm doing any thing wrong here.

        var klovReporter = new KlovReporter();

        klovReporter.LoadConfig(configFilePath);

        // specify mongoDb connection
        klovReporter.InitMongoDbConnection("192.168.28.88", 27017);

        // specify project ! you must specify a project, other a "Default project will be used"
        klovReporter.ProjectName = "CsharpReports";

        // you must specify a reportName otherwise a default timestamp will be used
        klovReporter.ReportName = "Build " + DateTime.Now.ToString();

        // URL of the KLOV server
        klovReporter.KlovUrl = "192.168.28.88:8090";

        _extent = new ExtentReports();
        _extent.AttachReporter(klovReporter);

I am using the below xml file for the custom configuration.

<?xml version="1.0" encoding="UTF-8" ?>
<extentreports>
  <configuration>
    <!-- report theme -->
    <!-- standard, dark -->
    <theme>dark</theme>

    <!-- document encoding -->
    <!-- defaults to UTF-8 -->
    <encoding>UTF-8</encoding>

    <!-- protocol for script and stylesheets -->
    <!-- defaults to https -->
    <protocol>https</protocol>

    <!-- title of the document -->
    <documentTitle>Automation Test Report</documentTitle>

    <!-- report name - displayed at top-nav -->
    <reportName>Automation Test Report</reportName>

    <!-- location of charts in the test view -->
    <!-- top, bottom -->
    <testViewChartLocation>bottom</testViewChartLocation>

    <!-- custom javascript -->
    <scripts>
      <![CDATA[

       ]]>
    </scripts>
  </configuration>
</extentreports>

I would also be interested to know the type of views available in klov reporter(Community version). As i could see some of the views are missing in my report which are there in the demo klov reporter. Please take a look into the below reports for better understanding.

Available views in my klov report:

image

Views available in klov reporter demo.

image


Solution

  • No. To make any changes to Klov, you will have to modify the sources directly. The version you have share is 0.1.0 which is available now. Some of the elements are not available to the community version API which is why the Tags link is not visible.