1 Basic reports provided by Selenium
Under the cucumber options in your Test Runner file add the above file format under the plugin option. This will create a MyReports folder and under that folder it will generate the json,html,and juint reports . These are the basic reports provided by Selenium.
2 Cucumber Reports
Once the project is created right click on the src\test\resources folder create cucmber.json file. And add the below code to the JSON file
cucmber.publish.enabled = true and save the file.
3 Generate Extent Spark, HTML and PDF Reports through adapter
Step 1 - In your pom.xml file add the following dependencies
After adding the dependencies, you have to do certain configurations. Right click on the src/test/resources and create two new files extent.properties and extent-config.xml files.
Step 2 - Once the two files are created add the following code in the extent.properties file and save it
Under the extent-config.xml file add the below code and save it
Step 3 - Add the below adapter to your Test Runner file
"com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:"
Once all the three steps are done Extent reports are generated under the test output folder
4. Allure Reports
Add the Maven dependencies TestNG, Selenium java, WebDriver Manager and Allure-TestNG
Download the Allure binaries from below link
Download the appropriate file base on your OS
Unzip the file and set the path in the environment variables
In command prompt, go to your project folder where your allure results folder exists and run the allure serve command as shown in the below screenshot
Allure Reports will be generated.