KlovReporter

KlovReporter is the client for Klov server, and supports both versions of Klov below:


Installation

ExtentKlovReporter is no longer part of the standard library. If you are using Klov 1.0+, use the below dependency.

<groupId>com.aventstack</groupId>
<artifactId>klov-reporter</artifactId>
<version>${klov-reporter.version}</version>

Note: Version 5 does not support Klov versions 0.1.x, 0.2.x

To use the KlovReporter, you must supply a project name to uniquely identify the job your tests are running for. Additionally, the host/port of the Klov server and the MongoDB connection details are required to setup the reporter.


Usage with Extentreports

ExtentKlovReporter klov = new ExtentKlovReporter("YourProjectName");
klov
  .initKlovServerConnection("http://klov-host:port")
  .initMongoDbConnection("mongodb-host", "mongodb-port");
ExtentReports extent = new ExtentReports();
extent.attachReporter(klov);

All details above can also be setup from a klov.properties file:

project.name=YourProjectName
mongodb.host=mongodb-host
mongodb.port=mongodb-port
#mongodb.uri=mongodb-uri
klov.host=http://klov-host
klov.port=port

and consumed using:

klov.loadInitializationParams("path-to-klov.properties");