Allure Reporting

Refer to the below Links for Practice
Collections in Java
Complete List of Selenium Basics
50 Real Time Interview Questions
Real Time Scenario’s
Java Platform Standard Edition 8 Documentation
Java Quiz
Java OOPS Quiz
Selenium Advanced Quiz
Selenium Quiz

Allure Reporting,TestNG,Selenium WebDriver Framework

As a tester we are mainly interested in generating very good html reports to get to know the Test cases passed and failed. TestNG which is a java framework helps us in generation of index.html and emailable-report.html contains the information about the Test case Status. Even though it generates the status of the testcases we are mainly interested in taking screenshots,generation of PIE charts,LINE charts. In this tutorial we are doing to discuss on usage of Allure Framework to generate reports for different languages : JAVA,PYTHON,JAVASCRIPT,RUBY,GROOVY,PHP,DOT NET and SCALA.




GENERATE ALLURE REPORTING:

Subscribe to our YOUTUBE channel for more updates on automation videos


Create a Maven project

Project Source Tree Directory Structure:
The standard layout for Maven projects (the application sources reside in ${basedir}/src/main/java and test sources reside in ${basedir}/src/test/java, where ${basedir} represents the directory containing pom.xml).

MavenDirectoryStructure-Allure configuration

MavenDirectoryStructure-Allure configuration

Configuration for Allure: pom.xml

Add the allure.properties under src/test/resources

TestExecutionListener.java

OpenMRSTests.java

OpenMRSPage.java

TestBase.java

ProjectConfiguration.java

totalqa.xml

Right Click on the project and select Run configuration

AllureConfiguration

AllureConfiguration


Maven Goals as ‘site’

maven goals site

View the Reports in Firefox Brower only.

allure-maven.html

allure-maven.html

Finally, we are able to capture the allure reports as shown below:

allure-maven.html

allure selenium report

History of Test Execution Results

AllureReportHistory

AllureReportHistory

Duration and Retries Trend

AllureGraphs

AllureGraphs

11 comments on “Allure Reporting

  1. Rizwanulla Khan

    Hi I used the above steps
    I got an error Description Resource Path Location Type
    The type org.openqa.selenium.internal.Killable cannot be resolved. It is indirectly referenced from required .class files BaseClass.java

    Can u please help me on this

    Reply
  2. Nasreen

    I am trying allure reports with Cucumber

    POM File:

    org.apache.maven.plugins
    maven-surefire-plugin
    2.18.1

    false

    -javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar
    -Dcucumber.options=”–plugin ru.yandex.qatools.allure.cucumberjvm.AllureReporter”

    org.aspectj
    aspectjweaver
    ${aspectj.version}

    true

    ru.yandex.qatools.allure
    allure-maven-plugin
    2.5

    On Compilation the below error is thrown

    [ERROR] ‘build.plugins.plugin[org.apache.maven.plugins:maven-surefire-plugin].dependencies.dependency.version’ for org.aspectj:aspectjweaver:jar must be a valid version but is ‘${aspectj.version}’.

    Kindly help me to resolve this.

    Thanks in advance

    Reply
  3. Jorge

    HI gys,

    I am trying to download this aspectJ weaver dependency using Maven as I need it for Allure reporting using Cucumber, here’s the dependency:

    org.aspectj
    aspectjweaver
    ${aspectj.version}

    1.9.4

    However it keeps telling me the dependency is not found, is there anything wrong in my dependency, was this moved from aspectj.org to another place so I can change groupID, thanks I will really appreciate your help. I already tried with other versions of the artifact.

    Reply
  4. Jayashree Dhar

    I am getting the following error while executing the testn.xml file :-
    [RemoteTestNG] detected TestNG version 7.0.0

    … TestNG 7.0.0 by Cédric Beust (cedric@beust.com)

    ===== Invoked methods
    =====
    FAILED CONFIGURATION: @BeforeClass loadConfig
    org.testng.TestNGException:
    Parameter ‘browsertype’ is required by BeforeClass on method loadConfig but has not been marked @Optional or defined
    Please suggest..

    Reply
  5. Deepti Biswas

    Hi,

    I am trying to attach the screen shot in allure report.getting the below error
    Please refer to C:\Users\Owner\eclipse-workspace_april2020\AllureReport\target\surefire-reports for the individual test results.
    Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
    There was an error in the forked process
    allureReport.AllureListener cannot be cast to org.testng.ITestNGListener
    org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
    allureReport.AllureListener cannot be cast to org.testng.ITestNGListener
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:665)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:279)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:243)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1077)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:907)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:785)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
    a

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *