Test Automation Reporting with Allure And TestNG


Test Automation Reporting with Allure And TestNG

In this blog, we are going to learn how we can generate an Interactive allure report in TestNg Framework.

Before Moving Further, let’s understand about Allure Report.

As mentioned in Allure official GitHub Page, Allure is a flexible lightweight multi-language test report tool that not only shows a very concise representation of what has been tested in a neat web report form, but allows everyone participating in the development the process to extract the maximum of useful information from everyday execution of tests.


To Generate Allure Report with TestNg we need to follow Below Steps:

    1)  In the Pom.xml file of our project install allure-testng maven dependency using this link. In this blog, I am using the below version.


    2)  Install Allure Binary binary file from this link into a local machine and unzip it to a particular location. In this blog, I am using version 2.8.0.




    3)  Go to Windows Control Panel and Set environment variable & provide the path of this binary file till bin folder.




    4)  For Validation type allure --version in command prompt to make sure that allure binary file is set up correctly.




    5)  Now Execute our TestNg project.

     6)  Refresh Our project now we will see one new folder named as allure-         results will be generated which will contain one result and JSON file           corresponding to each test case.



      7)  Now-Again go to Command Prompt and type below command
      allure server Path of allure result




     Result of this execution would be :
  






You may also be interested in knowing, How to integrate Allure Report with Jenkins.





SHARE THIS

Author:

My Name is Ankur Jain and I am currently working as Automation Test Architect.I am ISTQB Certified Test Manager,Certified UI Path RPA Developer as well as Certified Scrum Master with total 12 years of working experience with lot of big banking clients around the globe.I love to Design Automation Testing Frameworks with Selenium,Appium,Protractor,Cucumber,Rest-Assured, Katalon Studio and currently exploring lot in Dev-OPS as well. I am currently staying in Mumbai, Maharashtra. Please Connect with me through Contact Us page of this website.

Previous Post
Next Post
February 19, 2019 at 11:57 AM

How to get logs in allure report ?

Reply
avatar
February 24, 2019 at 12:59 PM

Thanks Ankur Allure reporting is really a good one .

Reply
avatar
Anonymous
April 21, 2019 at 8:30 AM

After following above setup I got this error. Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project TestFunctionaltesting: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: There was an error in the forked process
[ERROR] java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.introspect.AnnotatedMember.getType()Lcom/fasterxml/jackson/databind/JavaType;

Reply
avatar
April 21, 2019 at 12:29 PM

There was issue with your surefire plugin probably forked value is also given to that u need to remove that.still issue persist email your pom file to my id

Reply
avatar
Anonymous
April 24, 2019 at 7:52 AM

can you share your email id so i can sent the pom file?

Reply
avatar
August 5, 2019 at 10:56 AM

Hey Ankur, i am able to setup all the above steps and also able to generate the reports to temp folder, but if i open the reports i am getting 404 error, can you please help me in this?

Reply
avatar
September 26, 2019 at 2:40 AM

hello Ankur, I just read your very good post on allure report. just wanted to understand, do you have any idea on integrating allure with katalon studio??

Reply
avatar