2016-10-03

Introduction to Allure ,a test reporter, with Junit-maven.

This post has been moved to New Blog

26 comments:

  1. Thanks a lot to explain in details. I've tried to use Allure with Cucumber. They have some coverage on that but due to setup conflict -- failed to proceed, after report .xml file population. I will try again :)

    ReplyDelete
    Replies
    1. sure, let me know if you have any problem

      Delete
    2. Hi guys!Advise me please, how to share my report with somebody?

      Delete
    3. you can share as website if you keep your jetty running..

      Delete
  2. A nice article here with some useful tips for those who are not used-to comment that frequently. Thanks for this helpful information I agree with all points you have given to us. I will follow all of them.

    ReplyDelete
  3. Hi Shantonu,
    I am setting up Allure with Maven, Testng on Jenkins.
    I am able to generate Allure report on my local machine.
    I want to publish those reports with Jenkins, For that I am using Allure Jenkins Plugin.
    I have configured it.
    But I am unable to see the Allure Report Icon in my Jenkins Job.

    When I trigger my Jenkins Job I am getting below error.

    Pls let me know what I am doing wrong.
    Your help would be really appreciated


    [INFO]
    [INFO] --- maven-site-plugin:3.3:site (default-site) @ project ---
    [INFO] configuring report plugin ru.yandex.qatools.allure:allure-maven-plugin:2.5
    [INFO] Relativizing decoration links with respect to project URL: http://maven.apache.org
    [INFO] Rendering site with org.apache.maven.skins:maven-default-skin:jar:1.0 skin.
    [INFO] Skipped "Allure" report, file "allure-maven-plugin.html" already exists for the English version.
    [INFO] Skipped "Allure" report, file "allure-maven-plugin.html" already exists for the English version.
    [INFO] Generating "Allure" report --- allure-maven-plugin:2.5
    [INFO] Generate Allure report (aggregate) with version 1.4.24.RC3
    [INFO] Generate Allure report to C:\Program Files\Jenkins\jobs\TryMaven\workspace\default\target\site/allure-maven-plugin
    [INFO] Found results directory C:\Program Files\Jenkins\jobs\TryMaven\workspace\default\target\allure-results
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 01:05 min
    [INFO] Finished at: 2017-07-08T16:21:08+05:30
    [INFO] Final Memory: 29M/211M
    [INFO] ------------------------------------------------------------------------
    ERROR: Build step failed with exception
    java.lang.NullPointerException
    at ru.yandex.qatools.allure.jenkins.AllureReportPublisherDescriptor.getCommandlineInstallation(AllureReportPublisherDescriptor.java:98)
    at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.generateReport(AllureReportPublisher.java:147)
    at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.perform(AllureReportPublisher.java:93)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:730)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:676)
    at hudson.model.Build$BuildExecution.post2(Build.java:186)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:621)
    at hudson.model.Run.execute(Run.java:1760)
    at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:415)
    Build step 'Allure Report' marked build as failure

    ReplyDelete
    Replies
    1. your exception tells you every thing..

      if you run jenkins jobs only via maven.. then this blog will work.. you need jetty to expose.. thats all

      but, you are trying to use Allure jenkins plugins . Which needs command line runner (allure) .. and that is missing.
      In this way, you dont need any server to show your results, built in jenkins will show you that, you need to generate report, make site and point destination of web root which exactly allure jenkins plugins does.

      I should say, to resolve your problem, Please install allure-jenkins plugins in you jenkins properly (host).. and then create job to run allure test.

      Delete
  4. Hi all
    I'm new in project with Allure and I have a question.

    I found this article very interesting and I use it to write some automated test.
    But what changes are needed to "update" the project to new version of allure?

    Thank you in advance
    Cristian

    ReplyDelete
    Replies
    1. just change version number in POM

      1.4.24.RC3

      thats all.

      Delete
  5. Hi Shantonu, Does Allure report support cucumber test cases?

    ReplyDelete
    Replies
    1. yes, https://github.com/sarkershantonu/Automation-Getting-Started/tree/master/Allure-cucumber-failsafe

      Delete
  6. Hi,
    Did you get a chance to create a similar article to use Allure2 with xUnit?
    Thanks.

    ReplyDelete
    Replies
    1. I did last month , its fairly same, with some added properties

      Delete
    2. Hi Shantonu,

      Could you please share similar example for Allure2 with TestNG. I uprgaded to allure2 , test body seem to be missing in my reports , need to know the configuration changes.

      Thanks.

      Delete
    3. please keep eye on this repository, i will upload shortly(1week)

      Delete
    4. https://github.com/sarkershantonu/Automation-Getting-Started

      Delete
  7. Hi all,

    How can I change Allure Logo and Allure Report Name?

    Thanks
    Raju.s

    ReplyDelete
    Replies
    1. yes, you can

      1. https://docs.qameta.io/allure/#_custom_logo

      2. https://stackoverflow.com/questions/48709263/how-to-customize-allure-report-title-and-logo

      Delete
  8. Hi Shantonu. Really interesting blog. I had a doubt. I am getting allure report as NaN, unknown when running from jenkins. Not understanding what exactly is the problem. Kindly help

    ReplyDelete
    Replies
    1. when running from jenkins, have you installed allure cli tools?

      Delete
  9. how to add executors info in executors.json
    i am using maven, bamboo

    ReplyDelete
    Replies
    1. executor info can be given executor.json

      {"name":"Bamboo_user_name",
      "buildName":"Project Name",
      "type":"Banboo"
      }

      Delete
  10. I want to add multiple executors in the Allure report, how to add multiple executors?

    ReplyDelete
    Replies
    1. executors ? do you mean multiple junit runners?

      Delete
  11. when I generate Allure report folder from allure-results and open the index.html file, I do not get the report. It saying loading for all. How to get this index.html work so that i can directly send this report to my client rather then saying them to run the command. And I am not using any tool like jenkins, my project is in Maven

    ReplyDelete