Cucumber 4 Generating Latest Extent Reports and Maven Cucumber reporting plugin

Поділитися
Вставка
  • Опубліковано 1 гру 2024

КОМЕНТАРІ • 77

  • @yuvarajsanthanakrishnan7702
    @yuvarajsanthanakrishnan7702 3 роки тому +1

    If I include tag name as in pom.xml file it throws warning as Invalid plugin configuration: cucumberOutput. Kindly let me know how to solve it.

  • @gayathrivr
    @gayathrivr 3 роки тому +1

    Tons of thanks it worked for me

  • @ramyasri1397
    @ramyasri1397 4 роки тому +3

    Hi Sir,
    Could you please post the entire dependencies here. That would be really helpful.

    • @seleniumautomation
      @seleniumautomation  4 роки тому +14

      Here you go:


      org.apache.maven.plugins
      maven-compiler-plugin
      3.8.1

      1.8
      1.8



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

      true







      net.masterthought
      maven-cucumber-reporting
      5.0.0


      execution
      verify

      generate


      Way2Automation Cucumber Reports
      target/cucumber-reports/advanced-reports
      target/cucumber-reports/cucumber.json
      1
      false
      false
      ${project.build.directory}/cucumber-reports

      **/*.json

      ${project.build.directory}/cucumber-reports
      false









      junit
      junit
      4.13
      test



      io.cucumber
      cucumber-java8
      4.8.1



      io.cucumber
      cucumber-core
      4.8.1



      io.cucumber
      cucumber-junit
      4.8.1
      test





      com.aventstack
      extentreports-cucumber4-adapter
      1.0.12


      io.cucumber
      cucumber-java


      io.cucumber
      cucumber-core

  • @srikanthy2146
    @srikanthy2146 3 роки тому +2

    Could you please help to take screen shot and attach to the report

    • @seleniumautomation
      @seleniumautomation  3 роки тому

      Try this: In Base class

      public String fileName;
      public String filePath;
      public void takeScreenshot() {
      Date d = new Date();
      fileName = d.toString().replace(":", "_").replace(" ", "_")+".jpg";
      filePath = System.getProperty("user.dir")+"\\target\\cucumber-reports\\advanced-reports\\extentreports\\"+fileName;
      File scrFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
      try {
      FileUtils.copyFile(scrFile, new File(filePath));
      } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      }
      try {
      ExtentCucumberAdapter.getCurrentStep().addScreenCaptureFromPath(fileName);
      } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      }
      }
      and then in Hooks:
      @After
      public void tearDown(Scenario scenario) {

      if(scenario.isFailed()) {

      //captureScreenshot
      takeScreenshot();
      ExtentCucumberAdapter.getCurrentStep().fail("Screenshot");
      ExtentCucumberAdapter.getCurrentStep().fail("");
      }
      quit();
      }

    • @srikanthy2146
      @srikanthy2146 2 роки тому

      Thanks for your help sir.

  • @gobinathr1992
    @gobinathr1992 4 роки тому +3

    Hi Rahul,
    I wanted to know from where the extent.properties file is called? And wanted to know know what are all the plugins added in test runner class. Can I get the code part or access to the repository please??

  • @meditationandrelaxationmus741
    @meditationandrelaxationmus741 3 роки тому

    I get forked exception problem in maven-sure-fire plugin I don't know where I am going wrong

  • @vinayrao9067
    @vinayrao9067 2 роки тому

    My query is this, you simply run the project, but nothing to happen on web side, as this is the web automation project, then how it gave the report about passed or failed scenario

  • @apurvapote7343
    @apurvapote7343 9 місяців тому

    Great explanation

  • @saitejaithagoni1168
    @saitejaithagoni1168 3 роки тому

    Hi, when i run clean install my test are not being picked. Running Runner.TestRunner
    [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.681 s - in Runner.TestRunner
    [INFO]
    [INFO] Results:
    [INFO]
    [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
    [INFO]
    Could you please suggest what am I possibly doing wrong? looked in stackoverflow solutions in thier did not work

    • @seleniumautomation
      @seleniumautomation  3 роки тому

      Just run from the runner file first and then instead of doing maven clean only run maven install

    • @srikanthy2146
      @srikanthy2146 2 роки тому

      @@seleniumautomation Sir, did the same thing but no luck. Kindly help on this sir

  • @sakthik6064
    @sakthik6064 4 роки тому

    Hi Rahul,I am trying to generate the cucumber extent report in Jenkins...I have done the configuration as per the video...and report getting generated in my local machine but when come to Jenkins browser which is not available but my maven build run successfully and archiving the report from the local machine to Jenkins...but no reports in my Jenkins folder

  • @vedantjagani3760
    @vedantjagani3760 4 роки тому +1

    Hi Sir, Could you please help me here? I am receiving an error: Unrecognized plugin: com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:

  • @priyatewari8663
    @priyatewari8663 2 роки тому

    Hello Rahul, I am getting below error:
    java.lang.IllegalArgumentException: The plugin specification 'com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:' has a problem:
    Could not load plugin class 'com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter'.
    Plugin specifications should have the format of PLUGIN[:[PATH|[URI [OPTIONS]]]
    Valid values for PLUGIN are: html, json, junit, message, pretty, progress, rerun, summary, teamcity, testng, timeline, unused, usage

    • @seleniumautomation
      @seleniumautomation  2 роки тому

      Extent cucumber dependency must match your cucumber dependency version

  • @prashantshrivastava2646
    @prashantshrivastava2646 3 роки тому

    How to add Screeb shot in andvance cucumber report when step is failed

  • @ramansharma5014
    @ramansharma5014 2 роки тому

    Cucumber JVM report is not generating in the output directory

  • @PoojaSingh-wb8ij
    @PoojaSingh-wb8ij 3 роки тому

    Can your please share this TestRunner plugins?

  • @TheFactMan24
    @TheFactMan24 4 роки тому

    Hi Sir, Thanks much for the video.. Extent test report is very easy and useful.

  • @sivanandakudumula4597
    @sivanandakudumula4597 4 роки тому +1

    how to add screenshot on failure to these beautiful reports?

    • @seleniumautomation
      @seleniumautomation  4 роки тому +1

      Screenshot for this plugin will be generated with the help of logger report, In your exent.properties file add couple more fields i.e. extent.reporter.bdd.start=true
      extent.reporter.html.start=true
      extent.reporter.logger.start=true
      extent.reporter.html.config=html-config.xml
      extent.reporter.logger.config=logger-config.xml
      extent.reporter.html.out=test-output/HtmlReport/ExtentHtml.html
      extent.reporter.logger.out=test-output/LoggerReport/
      and once you run your test again you will see a folder generated with the name LoggerReport, just open index.html file and you will find the screenshot link there

    • @TheFactMan24
      @TheFactMan24 4 роки тому

      Syntax-EventFiringWebDriver eDriver=new EventFiringWebDriver(driver);
      File srcFile = eDriver.getScreenshotAs(OutputType.FILE);

  • @rajendramahapatra3293
    @rajendramahapatra3293 4 роки тому

    I am not able to generate Extent Report. I am using 6.1.2 version of cucumber-Java and cucumber-junit

  • @jitendrasawant3872
    @jitendrasawant3872 3 роки тому

    Hi Rahul Thank you for your Help and video, I got error in POM after adding grasshopper adapter and i don't no how to solve plz help me and error is "Missing artifact com.github.ralfstuckert.pdfbox-layout:pdfbox2-layout:jar:1.0.0" any one plz help me in this.

  • @Venkateshrajendran21
    @Venkateshrajendran21 3 роки тому

    Hi Sir, Kindly explain how to handle the generate extent report with proper execution results ?

    • @helloramesh6193
      @helloramesh6193 2 роки тому +1

      search another vidoes doesnot have clarity

  • @bhaskaryt6914
    @bhaskaryt6914 2 роки тому

    How to get the extent-config.xml and extent.properties file in the resources ??
    Do we create them manually ?

  • @vasundharaprakashreddy2740
    @vasundharaprakashreddy2740 4 роки тому

    Hi sir,
    I am not able to generate reports, instead working fine with cucumber reports. Could you please tell me what might be the issue!

  • @fayazbaig2490
    @fayazbaig2490 4 роки тому

    Thanks a lot please share the link of this code please

  • @suruchigarg57
    @suruchigarg57 8 місяців тому

    From where we will get .xml file

  • @cllanosf
    @cllanosf 4 роки тому

    please share the github link
    How to capture evidence within the report
    Excuse my English, I don't speak much .. I'm from Peru ...
    congratulations for the video and for sharing knowledge

    • @ashishpadiyar27
      @ashishpadiyar27 4 роки тому

      public static void teardown(Scenario s) {

      if (s.isFailed()) //isfailed method of stepresult in cucumber
      {
      final byte[] screenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES);
      s.attach(screenshot, "image/png", "screenshot");
      // s.embed(screenshot, "image/png");
      }
      driver.quit();
      }

  • @rajasekharmaddigalla1463
    @rajasekharmaddigalla1463 4 роки тому

    Hi sir, could you please help on how to add a screenshot and how to trigger this extent report to the mail using extentreports-cucumber4-adapter

    • @seleniumautomation
      @seleniumautomation  4 роки тому +1

      Screenshot for this plugin will be generated with the help of logger report, In your exent.properties file add couple more fields i.e. extent.reporter.bdd.start=true
      extent.reporter.html.start=true
      extent.reporter.logger.start=true
      extent.reporter.html.config=html-config.xml
      extent.reporter.logger.config=logger-config.xml
      extent.reporter.html.out=test-output/HtmlReport/ExtentHtml.html
      extent.reporter.logger.out=test-output/LoggerReport/
      and once you run your test again you will see a folder generated with the name LoggerReport, just open index.html file and you will find the screenshot link there

    • @rajasekharmaddigalla1463
      @rajasekharmaddigalla1463 4 роки тому

      @@seleniumautomation Thanks a lot for your replay sir, when compared to other channels I found, your channel is so good.And one last question."Sir, how can we send this extent report directly to the mail", do we have any way to trigger directly to our mail? Thank you once again

  • @srinidisomasundaram1603
    @srinidisomasundaram1603 4 роки тому

    I'm getting a blank report. Any reason for that?

  • @mdhossain3532
    @mdhossain3532 4 роки тому

    hi, Rahul. can you make this video again by showing how to run this maven projects from window command please .

    • @seleniumautomation
      @seleniumautomation  4 роки тому

      The project was created and executed on Windows itself, anything specific you are looking for?

    • @mdhossain3532
      @mdhossain3532 4 роки тому

      I was able to create the jvm report but I want know how can I run this maven cucumber project from windows command line

  • @jomygeorge9102
    @jomygeorge9102 4 роки тому

    Hi , Can yu please explain this configuration of extent report with the existing framework (POM with page factory in cucumber - Udemy course) .So that we can update the extent report from 1.1 to 4.0.

  • @geethapanneerselvam6031
    @geethapanneerselvam6031 4 роки тому

    Hi Sir, Thanks much for the video.. it worked out👍

  • @santhoshkumar-vp5nf
    @santhoshkumar-vp5nf 4 роки тому

    I'm using Cucumber 5, will it work?

  • @deeptimadhu
    @deeptimadhu 4 роки тому

    Cucumber jvm report worked!!

  • @amrutaselmokar1126
    @amrutaselmokar1126 4 роки тому

    Hello Sir, i am not able to see your project can you please help me to find project'

  • @poojanavdeti1031
    @poojanavdeti1031 4 роки тому +1

    please share the github link

  • @meghnabakshi7648
    @meghnabakshi7648 4 роки тому

    Hello Sir,
    Where can i get this extent.config file and extent. properties file?

  • @imtiazbasha4359
    @imtiazbasha4359 4 роки тому

    Can you share entire pom.xml file plz

  • @hima3867
    @hima3867 4 роки тому

    hello sir , how to add screenshot in this report

    • @ashishpadiyar27
      @ashishpadiyar27 4 роки тому

      public static void teardown(Scenario s) {

      if (s.isFailed()) //isfailed method of stepresult in cucumber
      {
      final byte[] screenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES);
      s.attach(screenshot, "image/png", "screenshot");
      // s.embed(screenshot, "image/png");
      }
      driver.quit();
      }

  • @ashirbadprusty9327
    @ashirbadprusty9327 4 роки тому +2

    Hi Sir,
    How to add screenshot in Cucumber Maven Report?
    Thanks

  • @devarapallirohini5369
    @devarapallirohini5369 4 роки тому

    Hi Sir,
    I have a small question
    In our project we run the script from the maven goal in IntelliJ...we dont run the runner class as JUNIT, but for generating extent reports we need to run the class as junit.
    Are there any other changes that can be done in pom.xml file apart from adding dependencies so that when we run the project as maven project report gets generated.
    Please let me know your inputs

  • @hussamyasin8586
    @hussamyasin8586 4 роки тому

    Hello Mr. Rahul, I tried the steps mentioned in the video and I keep getting below error. also I have purchased your course on udemy and watched the detailed tutorial but still im not able to fix it:
    io.cucumber.core.exception.CucumberException: Couldn't load plugin class: com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter

    • @seleniumautomation
      @seleniumautomation  4 роки тому

      What all dependencies you have added?

    • @hussamyasin8586
      @hussamyasin8586 4 роки тому

      @@seleniumautomation Its too long im not able to paste it here the page keep hanging, would you please gimme an email address that I can share you the POM file on ?

    • @seleniumautomation
      @seleniumautomation  4 роки тому

      @@hussamyasin8586 trainer@way2automation.com

    • @sreejishnu8226
      @sreejishnu8226 4 роки тому

      @Selenium Tutorial @Hussam Yasin
      Im also getting the same error. Could you please help me to resolve it?

    • @shankarsh7572
      @shankarsh7572 4 роки тому

      @@seleniumautomation Even i was getting the same error. Could you please let me know the changes required ?

  • @naani55
    @naani55 4 роки тому

    hi sir .. can you please share extent config xml file

  • @AnilKumar-hr3jq
    @AnilKumar-hr3jq 4 роки тому

    Hello Sir,For me the extent reports are generated but dont not why JVM reporting is not working. I am not able to generate report itself. Any possible causes