Giter Club home page Giter Club logo

extentreport's Introduction

Extent/Klov Reporting

Introduction

Hi All, I had created this demo-project which will in-cooperate Extent Reports With Klov integration. Anyone can use this demo-project as it will be helpful for a quick-start.

NOTE: There are no designing principles that I had incorporated in my project so as to keep it simple.

Project Overview

Below are the key points in my project : -

a) Klov Integration :
Klov is a part of Extent Reports and is generally used to view all the old builds which were executed earlier.

b) Extent Spark Reporter Generation :
I am also creating Extent Spark Reporter which is a plain HTML file and can be accessed using any browser. It contains the report for current executed build. (it will not contain older build run report).

c) Extent PDF Reporter :
I had also created a PDF file for the current report which is generated using "Extent Spark Reporter". Anyone can use it to send to your PMs, Stakeholder etc to get a complete view of your report in PDF format.

NOTE : Docker Compose Yml File :
I had created a docker compose yml file which can be used for quick starting the KLOV server in your local (without worrying about MongoDb installation). You can use Local Klov to access Klov Report generated.

Technology Stack Used

1. Java
2. Docker

Pre-Requisite

1. Docker Installation.
2. Maven Installed in your local.
3. Any of your favorite IDE.

Execution

1. Clone the repository and checkout to main branch.
2. Run the below Docker Commands. (Run the docker commands while being inside the project)

Docker Commands

1. docker-compose up --build : Since you are using the project 1st time, run this command to install all dependencies.

Note : Run the command "docker-compose up" from 2nd time after above steps is successfully executed.

2. docker-compose down : Stopping all the running containers which are getting executed in above 1st step.

3. Run the maven command : "mvn clean install" to run the project.
4. Check the report at "report-output" folder.

Issues Faced

There are some issues which I had faced while creating this project. Documenting these so that it would be helpful for all.

a) Docker Issue :

I was facing one issue while creating Docker Compose Yml file (integrating mongo db with Klov Server). Since Klov is having dependencies with Mongo Db, so klov will use the MongoDB URL.

Issue - "com.mongodb.MongoSocketOpenException: Exception opening socket"

Solution - Use "SPRING_DATA_MONGODB_URI" as "mongodb://host.docker.internal:27017" instead of "mongodb://127.0.0.1: 27017".

Docker Issue

b) Klov Old version issue :

In case if you are using old version of extent report and Klov report (<= 4.x), then there is an issue, as Build Number were coming as #null in Klov report and failures were also not getting reported.

Issue - Klov does not report on failures and build numbers are shows as nulls

Solution - Upgrade everything to the latest version and switch from "Extent HTMLReport" to " ExtentSparkReporter"

Old Version Issue

c) Threading Issue :

In case even if you are using latest Extent Report & Klov Report version, you will still face one issue as Project name is getting generated but when you will click on the project it will appear blank and also there will be 1 duplicate project created.

Solution - Use ThreadLocal when calling Extent Test class variable, and also make use of "synchronized" methods as it will ensure threads handling. This is already present under ExtentManager & ExtentReport Class

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.