Cucumber Extent Report

Cucumber Extent Report

Update: There is a latest version (3.x.x) with ExtentX support available. Refer here for more details.

33 Replies to “Cucumber Extent Report”

    1. You are passing the output folder on your plugin. So the report will be generated on the specified folder. Hope the steps mentioned here are detailed enough.

  1. Hi Vimal,

    I have a 2 part Question.

    1 – In version 1.1.1 you had this function: ExtentCucumberFormatter.initiateExtentCucumberFormatter();
    Which was extremely helpful for generating Folders with Reports based on TimeStamps.
    Is there a way to use that in 2.0.4? If not would it be possible to be included in your next release?

    2 – In version 1.1.1 I was able to generate both Json & Html Report via format = { “pretty”,”html:output/cucumber”,”json:output/cucumber/cucumber.json” },

    but since the update is requires me to add it in the Plugin section, do you know of a way to generate both?

    Please help šŸ™‚

  2. Thanks for the utility – I want to generate separate reports for each feature with TestNG. To do it , I created separate test runner for each feature and added feature name in the cucumberOption pluggins. But still all features are grouped under one report. Please suggest what needs to be done.

    1. Are you using different report name for each runner? If you use the same report name, it will be grouped. However I never tested this usecase because I feel it is a cornered one.

  3. Hey Vimal – I’m using your plugin for many months now and I love it! I only have one little problem with the updated version (2.0.4): when I run different tests the new test is overwriting the existing report. I would like to be able to append tests result of new tests to an old report. With earlier versions of your plugin this was possible by passing a boolean to your ‘initiateExtentCucumberFormatter()’ function. Do you have any idea how I can resolve my issue?

    Thanks in advance and keep up your nice work!

    1. Yes, this had been already reported which I’m currently working on. I’ll update here once done.

  4. Hey Vimal, Thank you so much for the documentation you provided for setting up the framework. I am successfully able to move ahead with my automation suite.
    I have one small question, the file has the method to generate the screenshot. But I want to take a screenshot once the scenario execution completes (be it Pass or Failure) and not on every step as that will go on adding screenshot for each and every step which will end up with heavy storage usage in system.

    I tried by adding it in my testNg runner file (in @AfterMethod annotation), but it doesn’t helped. Can you please suggest how to do that?

      1. I tried including @After hook in my TestNg runner file, but program didn’t picked that up as that will not be combined with testng annotations. Can you please let me know exactly how to do that?

        1. Cucumber hooks should either be part of your step definition class or create a class with just hooks and include as part of your glue. Kindly refer the cucumber jvm dicumentation for more details.

  5. Hi Vimal,
    Iā€™m running 2 scenarios which has 4 steps each, however in the charts it shows
    8 test(s) passed
    0 test(s) failed, 0 others

    Could you please let me know, what I am doing wrong here

  6. Hello

    Thanks for your extraordinary contribution. I tried to download your git project and run to understand so that i can implement extent reports for my cucumber projects. however and files has errors. import cucumber.api.testng.AbstractTestNGCucumberTests; throws an error which says import cucumber.api.testng cannot be resolved.Hence in the line :- public class MyTestNGCukesRunner extends AbstractTestNGCucumberTests it says AbstractTestNGCucumberTests cannot be resolved to a type. Can you help me on this please?


    With Regards

    1. Hello Vimal

      I was able to solve that issue. basically i didnt have the jar for cucumber-testng jar. So that issue was resolved. But however i have another issue

      at com.cucumber.listener.Reporter.addStepLog(
      at com.cucumber.stepdefinitions.MyStepdefs.I_have_cukes_in_my_belly( line66 : public static void addStepLog(String message) {
      getCurrentStep().info(message); ——- This is line 66

      and line 15: @Given(“I have (\d+) cukes in my belly”) public void I_have_cukes_in_my_belly(int cukes)
      throws IOException {
      Reporter.addStepLog(“My test addStepLog message”); —- This is line15
      Reporter.addScenarioLog(“This is scenario log”);

      I kindly request you to help me on this. Thanks

      With Regards

      1. Satya, kindly update to the latest version v3.0.0 and see whether the issue still exists. If exists, kindly log an issue in the github repo.

  7. Hey,

    I cannot see logs added using addStepLog/addScenarioLog in the report output. I just see the scenario steps and their status(Pass/Fail etc). Is there any step that needs to be added?


    1. Please ignore the above question as it is resolved!

      My Question:
      Is there a way to generate 2 reports. One with summary of the cucumber steps and other with details logs of the steps.

      Sakshi Singla

Comments are closed.