How to generate the Klov report

Refresh

April 2019

Views

268 time

1

I have been trying the generate the report using Klov and am new to it. First, I have installed the MongoDb 3.2 and initialized it in the cmd then added the Klov 0.1.0 jar and Mongo-java-driver-3.4.3 jar in my project. When I run my project, the connection has been initialized and it generated the Htmlreporter but I couldn't able to find out the Klov report anywhere.

I have initialized the MongoDb in the cmd: I have initialized the MongoDb in the cmd

Here the code:

htmlReporter = new ExtentHtmlReporter("TestReport.html");
    htmlReporter.setAppendExisting(true);
    klov = new KlovReporter();
    report = new ExtentReports();

    klov.initMongoDbConnection("localhost", 27017);

    klov.setProjectName("MyKlov");

    klov.setReportName("Build " + date.toString());

    klov.setKlovUrl("http://localhost");
    report.attachReporter(htmlReporter, klov);
    report.setSystemInfo("OS", "Windows");
    report.setSystemInfo("Host Name", "XXX");
    report.setSystemInfo("Environment", "QA");
    report.setSystemInfo("User Name", "XXXXXXX");

    htmlReporter.config().setChartVisibilityOnOpen(true);
    htmlReporter.config().setDocumentTitle(" Automation Testing");
    htmlReporter.config().setReportName("Automation Test Report");
    htmlReporter.config().setTestViewChartLocation(ChartLocation.TOP);
    htmlReporter.config().setTheme(Theme.STANDARD);

    logger = report.createTest("ROF");

After running the code, it shows some values in the cmd: After running the code, it shows some values in the cmd

what're the actual steps to generate the Klov report?

sam

1 answers

1
            extent = new ExtentReports();
            KlovReporter klovReporter = new KlovReporter();
            klovReporter.initMongoDbConnection("yourIPaddress", 27017);
            klovReporter.setProjectName("My project");
            klovReporter.setReportName("reportName");
            klovReporter.setKlovUrl("http://yourIPaddress");
            extent.attachReporter(klovReporter);

Start: - MongoDB 3.2 cmd - Run Klov jar in cmd

Natigate using browser to: http://localhost or yourIPaddress.