How to Generate cucumber Html and Cucumber-JVM-Report(Jenkin report) For maven cucumber report version greater then 3.16.0 I have comment the update
Жүктеу.....
Пікірлер: 124
@chfaisal14 жыл бұрын
Niraj very simple and best explaination
@kowsalyavijayan20244 жыл бұрын
hello Sir, There s a duration problem while compared to JUnit.Junit shows in seconds, while this one takes half of the time from Junit
@gokulvenugopal69915 жыл бұрын
Hi Niraj, 1. How did you get the screenshot added in the report? 2. Also is there a possibility that i get the reports in my desired naming format?
@NirajGupta
5 жыл бұрын
1. You can embed the screen shot using scenario.embed in @After tag @After public void teardown(Scenario scenario){ scenario.embed(screnshot,filetype) } 2yes you can change the name of the report according to your need
@NirajGupta
5 жыл бұрын
1. you can embed the screen shot in @After Anotation if (scenario.isFailed()) { System.out.println("################### i am inside screen shot after fail ####################"); final byte[] screenshot = ((TakesScreenshot) seleniumUtil.getDriver()).getScreenshotAs(OutputType.BYTES); scenario.embed(screenshot, "image/png"); // stick it in the report } 2.Report in Desired naming format not possible.you can point to the folder where to generate
@gokulvenugopal6991
5 жыл бұрын
@@NirajGupta Is it possible to create a new folder each time when a report is generated?
@NirajGupta
5 жыл бұрын
@@gokulvenugopal6991 yes you can.
@NirajGupta
5 жыл бұрын
@@gokulvenugopal6991 yes we can configure the new folder when each time test execute
@NirajGupta4 жыл бұрын
Little bit of change in pom .xml for maven cucumber report version greater then 3.16.0 -- net.masterthought maven-cucumber-reporting 5.0.0 execution verify generate cucumber-jvm-example ${project.build.directory}/cucumber-JVM-reports true 42 false ${project.build.directory} **/*.json true true
@bler436 ай бұрын
hello is there any way I can embed the overview feature.html to email notiications? i tired to do it but the formatting and colors are gone
@NirajGupta
5 ай бұрын
If you attached other folder like css, image, js and front and download all in single folder then formatting and colors will display
@ajbounimohamed47734 жыл бұрын
Hello Niraj Thnak you for the quality of explanation. Can you Share with me the Maven project . I was blocked for many days trying to find a solution on cucumber jenkins reports. Kindly
@NirajGupta
4 жыл бұрын
Just add the below plugin in your pom.xml.i will post the full ppm.xml if you required.nothing else is required
@Bromus3 жыл бұрын
Is there a way we can edit the titles of the Cucumber Report table?(i.e in this one it says Steps, Scenaros and Features but I want to change the string for those)
@NirajGupta
3 жыл бұрын
No it's not possible. you can change only title
@kaushikdas66794 жыл бұрын
Hi Niraj, with 3.15.0 maven-cucumber-reporting I am unable to generate the report. The jar does not appear/download in maven dependency. Do you have any resent update on this ?
@NirajGupta
4 жыл бұрын
yes small changes hs been done after 3.15.0 net.masterthought maven-cucumber-reporting 5.0.0 execution verify generate cucumber-jvm-example ${project.build.directory}/cucumber-JVM-reports true 42 false ${project.build.directory} **/*.json true true
@damirsimatov42383 жыл бұрын
Thanks for the video. Very useful comparing to default cucumber html visualization. Do you kno if there is a way to mark feature as successfull when some steps are pending?
@NirajGupta
3 жыл бұрын
Remove throw new PendingException(); from your steps.
@gyangijagadeesh4968 Жыл бұрын
buildNumber how to get dynamically if two reports generated?
@NirajGupta
Жыл бұрын
you need to write code to parse the html report to get build number
@automationgeek54393 жыл бұрын
Hi Niraj, I followed your steps to generate a Cucumber-JVM report using TestNG and Maven. My Cucumber tests ran fine through Maven. The report got generated but it says there are no features in your cucumber report. When I check my cucumber.json file, it is empty. Please assist.
@NirajGupta
3 жыл бұрын
Please this line in you pom.xml-true under surefire plugin like this-- org.apache.maven.plugins maven-surefire-plugin 2.22.2 true Please send me your execution console
@atulbankar1486Ай бұрын
But the question is how to send this report in gmail as it create multiple html file and cs files which are interdependent. We could not send a single html file in Gmail, we need to send a whole folder. After creating a zip for this folder gmail not allow to send it... So what's the solution, how can we send this report in Gmail?
@NirajGupta
Ай бұрын
You can zip and send in gmail.its possible send zip file in gmail
@sandeepmk68615 жыл бұрын
@Niraj Gupta Could you please provide the equivalent gradle script please(gradle.build)
@ANSUPLOADS
5 жыл бұрын
Hello Sandeep, have you cracked this? I am also looking for Gradle implementation of this report
@Deepak-re4fu
5 жыл бұрын
I am also looking for grader.
@NirajGupta
4 жыл бұрын
build.gradle--/* * This file was generated by the Gradle 'init' task. * * This generated file contains a sample Java Library project to get you started. * For more details take a look at the Java Libraries chapter in the Gradle * User Manual available at docs.gradle.org/6.0/userguide/java_library_plugin.html */ plugins { // Apply the java-library plugin to add support for Java Library id 'java-library' //id "net.masterthought.maven-cucumber-reporting" version "5.0.0" //id "com.github.spacialcircumstances.gradle-cucumber-reporting" id "com.github.spacialcircumstances.gradle-cucumber-reporting" version "0.0.11" } repositories { // Use jcenter for resolving dependencies. // You can declare any Maven/Ivy/file repository here. mavenLocal() jcenter() gradlePluginPortal() mavenCentral() //maven { url 'plugins.gradle.org/m2/' } maven { url "plugins.gradle.org/m2/" } } dependencies { // This dependency is exported to consumers, that is to say found on their compile classpath. api 'org.apache.commons:commons-math3:3.6.1' // This dependency is used internally, and not exposed to consumers on their own compile classpath. implementation 'com.google.guava:guava:28.0-jre' // mvnrepository.com/artifact/net.masterthought/cucumber-reporting //compile group: 'net.masterthought', name: 'maven-cucumber-reporting', version: '5.0.0' //compile group: 'gradle.plugin.com.github.spacialcircumstances', name: 'gradle-cucumber-reporting', version: '0.1.15' // Use JUnit test framework testImplementation 'junit:junit:4.12' testImplementation 'io.cucumber:cucumber-java:4.8.0' testImplementation 'io.cucumber:cucumber-junit:4.8.0' } cucumberReports { //doLast { //println 'tutorialspoint' outputDir = file('target/cucumber-JVM-reports') //buildId = '0' reports = files('target/cucumber.json') //} }
@niazmaksud11394 жыл бұрын
Hi Niraj, I received compilation error for maven-compiler-plugin:3.5.1:test compile. I added as true for both surefire and compiler but still I am getting the error. Project is running on jdk 1.8 Please help
@NirajGupta
4 жыл бұрын
can you please copy paste the error you are getting
@niazmaksud1139
4 жыл бұрын
@@NirajGupta problem resolved. I was using JRE! Changed to JDK
@hemanthsaibommuluri21614 жыл бұрын
Hi Niraj, Thanks for the video.I followed the same procedure adding the below plugin to my pom but report is not getting generated and I can see warning not able to find cucumber.jsion file.could you please help me .I think after giving clean install command it is deleting all the files in the target folder and in this process it is deleting cucumber.json file so report is not getting generated.could you please help me. . net.masterthought maven-cucumber-reporting 2.8.0 execution verify generate workflow ${project.build.directory}/cucumber-report-html ${project.build.directory}/cucumber-reports/cucumber.json
@NirajGupta
4 жыл бұрын
what is the path of your cucumber.json report it shoul be in target folder.Please check your runner class is your test is failing then you need to add this testfailureIgnore in testNg-- org.apache.maven.plugins maven-surefire-plugin 2.20 true if you are using latest version of maven cucumber report then use below configuration posted in comment
@RJV15 Жыл бұрын
How to do this in Katalon Studio?
@RBPL5 жыл бұрын
Good Explanation in detail. How can I email this overview-feature.html from Jenkins?
@NirajGupta
5 жыл бұрын
You can send the html report in jenkin Follow below steps to embed html file in emailcontent: Go to your jenkins job and click on Configure. Go to Post Build Actions and then select Editable Email Notifications. Select Content Type as HTML(text/plain) In the default content section replace $DEFAULT_CONTENT with following.
@NirajGupta
5 жыл бұрын
You can email your report-Click the ‘Add post-build action’ drop-down and select the ‘Editable Email Notification’ value. Fill the ‘Editable Email Notification’ fields. Project Recipient List : email_id@gmail.com
@naani55
4 жыл бұрын
@@NirajGupta hi sir ,, what should i need to mention to send html report in jenkins
@NirajGupta
4 жыл бұрын
@@naani55 post build section you need to add action to sen mail notification just configure the cucumber.json file path. put path as **/*.json
@akilapalanivelu25073 жыл бұрын
HI Niraj, I'm getting this error "Failed to parse plugin descriptor for net.masterthought:cucumber-reporting". Can you help me to resolve this issue?
@NirajGupta
3 жыл бұрын
Please paste your pom.xml and runner class
@introductionofsoftwaretest66864 жыл бұрын
Good Morning How are you ... You are doing a great job yours videos are user friendly .... Question : I have 35 test case in my frame work and i wanted to run smoke test . So what I did i have put all test cases in a new feature file name smoke.feature and now when i am running this feature file I am getting an error " Invalid Session Id " . I will appreciate if you please help me fix this error ..... All of my test cases are working great individually ...... Thank you You have a nice day Frank
@NirajGupta
4 жыл бұрын
I will suggest you to not create separate feature file for smoke.Better you tag all your smoke scenario in feature file as @smoke and run your test using same tag.
@gabrielqueiroz51255 жыл бұрын
When I run project with Maven and put Clean Install appear the message "ERROR StatusLogger No log4j2 configuration file found."
@NirajGupta
5 жыл бұрын
Please place your log4j.xml file under sec/test/resources
@pv9835
5 жыл бұрын
I don't know where is located log4j2.xml file.
@NirajGupta
5 жыл бұрын
@@pv9835 add the log4j.xml file under resiurce .I mean src/test/resorces
@raghurao300
4 жыл бұрын
@@NirajGupta r u saying log4j.properties file? i dont see any log4j.xml in my project folder
@NirajGupta
4 жыл бұрын
@@raghurao300 please add the log4j.properties file
@ksridhar2919894 жыл бұрын
Failed to execute goal net.masterthought:maven-cucumber-reporting:4.10.0:generate (execution) on project BDD: Execution execution of goal net.masterthought:maven-cucumber-reporting:4.10.0:generate failed: A required class was missing while executing net.masterthought:maven-cucumber-reporting:4.10.0:generate: org/apache/commons/configuration/ConfigurationException
@ksridhar291989
4 жыл бұрын
I have added cucumber reporting dependency 4.10 and i am getting this error
@nadaaljohani54324 жыл бұрын
Hello Niraj I have followed your same process exactly as you explained but json file is not generating but the JVM report is there with an error and out of any data. can you please help this the error failed to execute goal net.masterthought:maven-cucumber-reporting:5.0.0:generate (execution) on project kh-cucumber-labs: Error Found:
@NirajGupta
4 жыл бұрын
Yes I wil help you.send me your pom.xml and runner class
@@nadaaljohani5432 look like your test is failing due to which cucumber.json is not generating in target folder.please use-- org.apache.maven.plugins maven-surefire-plugin 2.19.1 **/TestRunner*.class true
@NirajGupta
4 жыл бұрын
use same code in .pom.xml-- net.masterthought maven-cucumber-reporting 5.0.0 execution verify generate cucumber-jvm-example ${project.build.directory}/cucumber-JVM-reports true 42 false ${project.build.directory} **/*.json true true
@5123karan3 жыл бұрын
Can we attach screenshots of failed scenarios with this report?
@NirajGupta
3 жыл бұрын
yes.Please watch this video-kzread.info/dash/bejne/kWiulKhuj9q9Zs4.html
@annapuvvada57223 жыл бұрын
Niraj gupta Jvm report local is not generating please can u help Please send me pom dependencies Test runner class as well
@NirajGupta
3 жыл бұрын
Niraj Gupta 9 months ago Little bit of change in pom .xml for maven cucumber report version greater then 3.16.0 -- net.masterthought maven-cucumber-reporting 5.0.0 execution verify generate cucumber-jvm-example ${project.build.directory}/cucumber-JVM-reports true 42 false ${project.build.directory} **/*.json true true
@ChandraSekhar-zv2bb
Жыл бұрын
I tried with above code on version 4.9.0 but i am getting error as About to generate cucumber report Net.masterthought.cucumber.reportbuilder generate error page Info unexpected error Can you please help with solution
@manishdwivedi33344 жыл бұрын
Hi Niraj, can you please share the configuration with gradle
@NirajGupta
4 жыл бұрын
plugins { // Apply the java-library plugin to add support for Java Library id 'java-library' //id "net.masterthought.maven-cucumber-reporting" version "5.0.0" //id "com.github.spacialcircumstances.gradle-cucumber-reporting" id "com.github.spacialcircumstances.gradle-cucumber-reporting" version "0.0.11" } repositories { // Use jcenter for resolving dependencies. // You can declare any Maven/Ivy/file repository here. mavenLocal() jcenter() gradlePluginPortal() mavenCentral() //maven { url 'plugins.gradle.org/m2/' } maven { url "plugins.gradle.org/m2/" } } dependencies { // This dependency is exported to consumers, that is to say found on their compile classpath. api 'org.apache.commons:commons-math3:3.6.1' // This dependency is used internally, and not exposed to consumers on their own compile classpath. implementation 'com.google.guava:guava:28.0-jre' // mvnrepository.com/artifact/net.masterthought/cucumber-reporting //compile group: 'net.masterthought', name: 'maven-cucumber-reporting', version: '5.0.0' //compile group: 'gradle.plugin.com.github.spacialcircumstances', name: 'gradle-cucumber-reporting', version: '0.1.15' // Use JUnit test framework testImplementation 'junit:junit:4.12' testImplementation 'io.cucumber:cucumber-java:4.8.0' testImplementation 'io.cucumber:cucumber-junit:4.8.0' } cucumberReports { //doLast { //println 'tutorialspoint' outputDir = file('target/cucumber-JVM-reports') //buildId = '0' reports = files('target/cucumber.json') //} }
@madhurichaudhari70472 жыл бұрын
Hi niraj its giving me error as jvm not found
@NirajGupta
2 жыл бұрын
please send me entire error message
@MuraliRajamanickam4 жыл бұрын
Could you please share your Github repository
@NirajGupta
4 жыл бұрын
which code do you need?
@MuraliRajamanickam
4 жыл бұрын
@@NirajGupta BDD cucumber framework, including cucumber reporting
Hi Niraj. Thank you for the video. It helps me to configure the Cucumber Reporting for Karate Framework. I need one help. The import files are not visible in your video in RUNNER file 'TestRunner.java.' It will be helpful if you can share the TestRunner.java file
@NirajGupta
4 жыл бұрын
Sure I will shortly
@NirajGupta
4 жыл бұрын
package com.AbstractSubmission.action; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.runner.RunWith; import cucumber.api.CucumberOptions; import cucumber.api.junit.Cucumber; @RunWith(Cucumber.class) @CucumberOptions(features = "src/test/resources/Featurefile/", tags = { "@table1" }, plugin = {"pretty", "html:target/cucumber-html-report", "json:target/cucumber.json", "junit:target/cucumber.xml"}, glue = { "com.learn" }) public class TestRunner { @BeforeClass public static void beforeall(){ System.out.println("Before all suit"); } @AfterClass public static void all(){ System.out.println("After All Suit"); } }
@rkiran416
4 жыл бұрын
@@NirajGupta what is the relevance of property buildSuccessOnTestFailure?
@NirajGupta
4 жыл бұрын
@@rkiran416 if test fail then also report will generate .if you have used attribute in surefire then no need to mention
@marlenisconcepcion43582 жыл бұрын
Can u share the pom.xml file
@amolkale11584 жыл бұрын
How to generate reports for python BDD, Please help
@NirajGupta
4 жыл бұрын
I am work on it.Give me some time
@sanjeets934 жыл бұрын
Hi Niraj,Is there a way to merge multupe cucumber jvm report into one.Please share if any.Thanks in Advance.
@NirajGupta
3 жыл бұрын
Just update the plugin it will merge multiple json into single JVM report net.masterthought maven-cucumber-reporting 5.0.0 execution verify generate cucumber-jvm-example ${project.build.directory}/cucumber-JVM-reports true 42 false ${project.build.directory} **/*.json true true
@sanjeets93
3 жыл бұрын
@@NirajGupta Many thanks Niraj.
@satishtesting194 жыл бұрын
Can we do similarly for pychram ?
@NirajGupta
4 жыл бұрын
Are you trying in python or java
@satishtesting19
4 жыл бұрын
@@NirajGupta Python. if you already have content how to do in python. please share me the link
@NirajGupta
4 жыл бұрын
@@satishtesting19 Python I am working on it.
@satishtesting19
4 жыл бұрын
@@NirajGupta Can you do a presentation using pycharm comunity version. how to execute BDD framework
@NirajGupta
4 жыл бұрын
@@satishtesting19 sure
@dextermorgan57285 жыл бұрын
Could you share with us the source code ?
@NirajGupta
5 жыл бұрын
We need only the runner class and pom.xml to generate this report.Please find the Pom.xml Please add this plugin in ypur pom.xml net.masterthought maven-cucumber-reporting 3.6.0 execution verify generate cucumber-jvm-example this is similar report as jenkins report ${project.build.directory}/cucumber-JVM-reports ${project.build.directory}/cucumber.json true true 42 you can change the path of cucumber.json report and cucumber JVM report according to your need
@sandeepmk6861
5 жыл бұрын
@@NirajGupta Could you please provide the equivalent gradle script please(gradle.build)
@NirajGupta
4 жыл бұрын
@@rebekamontana7656 Please watch this video-- for merging multiple report in single report kzread.info/dash/bejne/qXqCqqiEpdu5ddo.html
@kowsalyavijayan20244 жыл бұрын
how can i use this using gradle
@NirajGupta
4 жыл бұрын
Please comment for gradle
@NirajGupta
4 жыл бұрын
Please look comment for gradle
@NirajGupta
4 жыл бұрын
plugins { // Apply the java-library plugin to add support for Java Library id 'java-library' //id "net.masterthought.maven-cucumber-reporting" version "5.0.0" //id "com.github.spacialcircumstances.gradle-cucumber-reporting" id "com.github.spacialcircumstances.gradle-cucumber-reporting" version "0.0.11" } repositories { // Use jcenter for resolving dependencies. // You can declare any Maven/Ivy/file repository here. mavenLocal() jcenter() gradlePluginPortal() mavenCentral() //maven { url 'plugins.gradle.org/m2/' } maven { url "plugins.gradle.org/m2/" } } dependencies { // This dependency is exported to consumers, that is to say found on their compile classpath. api 'org.apache.commons:commons-math3:3.6.1' // This dependency is used internally, and not exposed to consumers on their own compile classpath. implementation 'com.google.guava:guava:28.0-jre' // mvnrepository.com/artifact/net.masterthought/cucumber-reporting //compile group: 'net.masterthought', name: 'maven-cucumber-reporting', version: '5.0.0' //compile group: 'gradle.plugin.com.github.spacialcircumstances', name: 'gradle-cucumber-reporting', version: '0.1.15' // Use JUnit test framework testImplementation 'junit:junit:4.12' testImplementation 'io.cucumber:cucumber-java:4.8.0' testImplementation 'io.cucumber:cucumber-junit:4.8.0' } cucumberReports { //doLast { //println 'tutorialspoint' outputDir = file('target/cucumber-JVM-reports') //buildId = '0' reports = files('target/cucumber.json') //} }
@kowsalyavijayan2024
4 жыл бұрын
Niraj Gupta thank you sir. One more question . My mgmt wanted to change the title in the report change feature in report to test case .is it possible to edit the jar and can u please give me an idea please
@NirajGupta
4 жыл бұрын
@@kowsalyavijayan2024 Feature can't be renamed because in cucumber we refere as feature
Пікірлер: 124
Niraj very simple and best explaination
hello Sir, There s a duration problem while compared to JUnit.Junit shows in seconds, while this one takes half of the time from Junit
Hi Niraj, 1. How did you get the screenshot added in the report? 2. Also is there a possibility that i get the reports in my desired naming format?
@NirajGupta
5 жыл бұрын
1. You can embed the screen shot using scenario.embed in @After tag @After public void teardown(Scenario scenario){ scenario.embed(screnshot,filetype) } 2yes you can change the name of the report according to your need
@NirajGupta
5 жыл бұрын
1. you can embed the screen shot in @After Anotation if (scenario.isFailed()) { System.out.println("################### i am inside screen shot after fail ####################"); final byte[] screenshot = ((TakesScreenshot) seleniumUtil.getDriver()).getScreenshotAs(OutputType.BYTES); scenario.embed(screenshot, "image/png"); // stick it in the report } 2.Report in Desired naming format not possible.you can point to the folder where to generate
@gokulvenugopal6991
5 жыл бұрын
@@NirajGupta Is it possible to create a new folder each time when a report is generated?
@NirajGupta
5 жыл бұрын
@@gokulvenugopal6991 yes you can.
@NirajGupta
5 жыл бұрын
@@gokulvenugopal6991 yes we can configure the new folder when each time test execute
Little bit of change in pom .xml for maven cucumber report version greater then 3.16.0 -- net.masterthought maven-cucumber-reporting 5.0.0 execution verify generate cucumber-jvm-example ${project.build.directory}/cucumber-JVM-reports true 42 false ${project.build.directory} **/*.json true true
hello is there any way I can embed the overview feature.html to email notiications? i tired to do it but the formatting and colors are gone
@NirajGupta
5 ай бұрын
If you attached other folder like css, image, js and front and download all in single folder then formatting and colors will display
Hello Niraj Thnak you for the quality of explanation. Can you Share with me the Maven project . I was blocked for many days trying to find a solution on cucumber jenkins reports. Kindly
@NirajGupta
4 жыл бұрын
Just add the below plugin in your pom.xml.i will post the full ppm.xml if you required.nothing else is required
Is there a way we can edit the titles of the Cucumber Report table?(i.e in this one it says Steps, Scenaros and Features but I want to change the string for those)
@NirajGupta
3 жыл бұрын
No it's not possible. you can change only title
Hi Niraj, with 3.15.0 maven-cucumber-reporting I am unable to generate the report. The jar does not appear/download in maven dependency. Do you have any resent update on this ?
@NirajGupta
4 жыл бұрын
yes small changes hs been done after 3.15.0 net.masterthought maven-cucumber-reporting 5.0.0 execution verify generate cucumber-jvm-example ${project.build.directory}/cucumber-JVM-reports true 42 false ${project.build.directory} **/*.json true true
Thanks for the video. Very useful comparing to default cucumber html visualization. Do you kno if there is a way to mark feature as successfull when some steps are pending?
@NirajGupta
3 жыл бұрын
Remove throw new PendingException(); from your steps.
buildNumber how to get dynamically if two reports generated?
@NirajGupta
Жыл бұрын
you need to write code to parse the html report to get build number
Hi Niraj, I followed your steps to generate a Cucumber-JVM report using TestNG and Maven. My Cucumber tests ran fine through Maven. The report got generated but it says there are no features in your cucumber report. When I check my cucumber.json file, it is empty. Please assist.
@NirajGupta
3 жыл бұрын
Please this line in you pom.xml-true under surefire plugin like this-- org.apache.maven.plugins maven-surefire-plugin 2.22.2 true Please send me your execution console
But the question is how to send this report in gmail as it create multiple html file and cs files which are interdependent. We could not send a single html file in Gmail, we need to send a whole folder. After creating a zip for this folder gmail not allow to send it... So what's the solution, how can we send this report in Gmail?
@NirajGupta
Ай бұрын
You can zip and send in gmail.its possible send zip file in gmail
@Niraj Gupta Could you please provide the equivalent gradle script please(gradle.build)
@ANSUPLOADS
5 жыл бұрын
Hello Sandeep, have you cracked this? I am also looking for Gradle implementation of this report
@Deepak-re4fu
5 жыл бұрын
I am also looking for grader.
@NirajGupta
4 жыл бұрын
build.gradle--/* * This file was generated by the Gradle 'init' task. * * This generated file contains a sample Java Library project to get you started. * For more details take a look at the Java Libraries chapter in the Gradle * User Manual available at docs.gradle.org/6.0/userguide/java_library_plugin.html */ plugins { // Apply the java-library plugin to add support for Java Library id 'java-library' //id "net.masterthought.maven-cucumber-reporting" version "5.0.0" //id "com.github.spacialcircumstances.gradle-cucumber-reporting" id "com.github.spacialcircumstances.gradle-cucumber-reporting" version "0.0.11" } repositories { // Use jcenter for resolving dependencies. // You can declare any Maven/Ivy/file repository here. mavenLocal() jcenter() gradlePluginPortal() mavenCentral() //maven { url 'plugins.gradle.org/m2/' } maven { url "plugins.gradle.org/m2/" } } dependencies { // This dependency is exported to consumers, that is to say found on their compile classpath. api 'org.apache.commons:commons-math3:3.6.1' // This dependency is used internally, and not exposed to consumers on their own compile classpath. implementation 'com.google.guava:guava:28.0-jre' // mvnrepository.com/artifact/net.masterthought/cucumber-reporting //compile group: 'net.masterthought', name: 'maven-cucumber-reporting', version: '5.0.0' //compile group: 'gradle.plugin.com.github.spacialcircumstances', name: 'gradle-cucumber-reporting', version: '0.1.15' // Use JUnit test framework testImplementation 'junit:junit:4.12' testImplementation 'io.cucumber:cucumber-java:4.8.0' testImplementation 'io.cucumber:cucumber-junit:4.8.0' } cucumberReports { //doLast { //println 'tutorialspoint' outputDir = file('target/cucumber-JVM-reports') //buildId = '0' reports = files('target/cucumber.json') //} }
Hi Niraj, I received compilation error for maven-compiler-plugin:3.5.1:test compile. I added as true for both surefire and compiler but still I am getting the error. Project is running on jdk 1.8 Please help
@NirajGupta
4 жыл бұрын
can you please copy paste the error you are getting
@niazmaksud1139
4 жыл бұрын
@@NirajGupta problem resolved. I was using JRE! Changed to JDK
Hi Niraj, Thanks for the video.I followed the same procedure adding the below plugin to my pom but report is not getting generated and I can see warning not able to find cucumber.jsion file.could you please help me .I think after giving clean install command it is deleting all the files in the target folder and in this process it is deleting cucumber.json file so report is not getting generated.could you please help me. . net.masterthought maven-cucumber-reporting 2.8.0 execution verify generate workflow ${project.build.directory}/cucumber-report-html ${project.build.directory}/cucumber-reports/cucumber.json
@NirajGupta
4 жыл бұрын
what is the path of your cucumber.json report it shoul be in target folder.Please check your runner class is your test is failing then you need to add this testfailureIgnore in testNg-- org.apache.maven.plugins maven-surefire-plugin 2.20 true if you are using latest version of maven cucumber report then use below configuration posted in comment
How to do this in Katalon Studio?
Good Explanation in detail. How can I email this overview-feature.html from Jenkins?
@NirajGupta
5 жыл бұрын
You can send the html report in jenkin Follow below steps to embed html file in emailcontent: Go to your jenkins job and click on Configure. Go to Post Build Actions and then select Editable Email Notifications. Select Content Type as HTML(text/plain) In the default content section replace $DEFAULT_CONTENT with following.
@NirajGupta
5 жыл бұрын
You can email your report-Click the ‘Add post-build action’ drop-down and select the ‘Editable Email Notification’ value. Fill the ‘Editable Email Notification’ fields. Project Recipient List : email_id@gmail.com
@naani55
4 жыл бұрын
@@NirajGupta hi sir ,, what should i need to mention to send html report in jenkins
@NirajGupta
4 жыл бұрын
@@naani55 post build section you need to add action to sen mail notification just configure the cucumber.json file path. put path as **/*.json
HI Niraj, I'm getting this error "Failed to parse plugin descriptor for net.masterthought:cucumber-reporting". Can you help me to resolve this issue?
@NirajGupta
3 жыл бұрын
Please paste your pom.xml and runner class
Good Morning How are you ... You are doing a great job yours videos are user friendly .... Question : I have 35 test case in my frame work and i wanted to run smoke test . So what I did i have put all test cases in a new feature file name smoke.feature and now when i am running this feature file I am getting an error " Invalid Session Id " . I will appreciate if you please help me fix this error ..... All of my test cases are working great individually ...... Thank you You have a nice day Frank
@NirajGupta
4 жыл бұрын
I will suggest you to not create separate feature file for smoke.Better you tag all your smoke scenario in feature file as @smoke and run your test using same tag.
When I run project with Maven and put Clean Install appear the message "ERROR StatusLogger No log4j2 configuration file found."
@NirajGupta
5 жыл бұрын
Please place your log4j.xml file under sec/test/resources
@pv9835
5 жыл бұрын
I don't know where is located log4j2.xml file.
@NirajGupta
5 жыл бұрын
@@pv9835 add the log4j.xml file under resiurce .I mean src/test/resorces
@raghurao300
4 жыл бұрын
@@NirajGupta r u saying log4j.properties file? i dont see any log4j.xml in my project folder
@NirajGupta
4 жыл бұрын
@@raghurao300 please add the log4j.properties file
Failed to execute goal net.masterthought:maven-cucumber-reporting:4.10.0:generate (execution) on project BDD: Execution execution of goal net.masterthought:maven-cucumber-reporting:4.10.0:generate failed: A required class was missing while executing net.masterthought:maven-cucumber-reporting:4.10.0:generate: org/apache/commons/configuration/ConfigurationException
@ksridhar291989
4 жыл бұрын
I have added cucumber reporting dependency 4.10 and i am getting this error
Hello Niraj I have followed your same process exactly as you explained but json file is not generating but the JVM report is there with an error and out of any data. can you please help this the error failed to execute goal net.masterthought:maven-cucumber-reporting:5.0.0:generate (execution) on project kh-cucumber-labs: Error Found:
@NirajGupta
4 жыл бұрын
Yes I wil help you.send me your pom.xml and runner class
@nadaaljohani5432
4 жыл бұрын
@@NirajGupta pom.xml com.bryandollery kh-cucumber-labs 1.0-SNAPSHOT UTF-8 11 11 net.masterthought maven-cucumber-reporting 5.0.0 execution verify generate cucumber-jvm-example ${project.build.directory}/cucumber-JVM-reports true 42 false ${project.build.directory} target/cucumber.json true true com.vimalselvam cucumber-extentsreport 3.1.1 test io.cucumber cucumber-java 5.6.0 test io.cucumber cucumber-junit 5.6.0 test org.seleniumhq.selenium selenium-java 3.141.59 test byte-buddy net.bytebuddy org.mockito mockito-core 3.3.3 test junit junit 4.12 test com.aventstack extentreports 3.1.2 com.aventstack extentreports-cucumber4-adapter 1.0.12 net.masterthought cucumber-reporting 5.3.0 4.0.0 /----------------------------------------classRunner----------------------------------/ @RunWith(Cucumber.class) @CucumberOptions(plugin = {"pretty", "summary","html:target/cucumber-reports", "junit:target/cucumber.xml", "json:target/cucumber.json"}, strict = true, snippets = CAMELCASE, tags = "not @wip", features = "src/test/resources") public class TestRunner { static { System.setProperty("webdriver.chrome.driver", "/chromedriver.exe"); System.setProperty("webdriver.chrome.silentOutput", "true"); getLogger("org.openqa.selenium").setLevel(SEVERE); } }
@nadaaljohani5432
4 жыл бұрын
@@NirajGupta I'm waiting for your help
@NirajGupta
4 жыл бұрын
@@nadaaljohani5432 look like your test is failing due to which cucumber.json is not generating in target folder.please use-- org.apache.maven.plugins maven-surefire-plugin 2.19.1 **/TestRunner*.class true
@NirajGupta
4 жыл бұрын
use same code in .pom.xml-- net.masterthought maven-cucumber-reporting 5.0.0 execution verify generate cucumber-jvm-example ${project.build.directory}/cucumber-JVM-reports true 42 false ${project.build.directory} **/*.json true true
Can we attach screenshots of failed scenarios with this report?
@NirajGupta
3 жыл бұрын
yes.Please watch this video-kzread.info/dash/bejne/kWiulKhuj9q9Zs4.html
Niraj gupta Jvm report local is not generating please can u help Please send me pom dependencies Test runner class as well
@NirajGupta
3 жыл бұрын
Niraj Gupta 9 months ago Little bit of change in pom .xml for maven cucumber report version greater then 3.16.0 -- net.masterthought maven-cucumber-reporting 5.0.0 execution verify generate cucumber-jvm-example ${project.build.directory}/cucumber-JVM-reports true 42 false ${project.build.directory} **/*.json true true
@ChandraSekhar-zv2bb
Жыл бұрын
I tried with above code on version 4.9.0 but i am getting error as About to generate cucumber report Net.masterthought.cucumber.reportbuilder generate error page Info unexpected error Can you please help with solution
Hi Niraj, can you please share the configuration with gradle
@NirajGupta
4 жыл бұрын
plugins { // Apply the java-library plugin to add support for Java Library id 'java-library' //id "net.masterthought.maven-cucumber-reporting" version "5.0.0" //id "com.github.spacialcircumstances.gradle-cucumber-reporting" id "com.github.spacialcircumstances.gradle-cucumber-reporting" version "0.0.11" } repositories { // Use jcenter for resolving dependencies. // You can declare any Maven/Ivy/file repository here. mavenLocal() jcenter() gradlePluginPortal() mavenCentral() //maven { url 'plugins.gradle.org/m2/' } maven { url "plugins.gradle.org/m2/" } } dependencies { // This dependency is exported to consumers, that is to say found on their compile classpath. api 'org.apache.commons:commons-math3:3.6.1' // This dependency is used internally, and not exposed to consumers on their own compile classpath. implementation 'com.google.guava:guava:28.0-jre' // mvnrepository.com/artifact/net.masterthought/cucumber-reporting //compile group: 'net.masterthought', name: 'maven-cucumber-reporting', version: '5.0.0' //compile group: 'gradle.plugin.com.github.spacialcircumstances', name: 'gradle-cucumber-reporting', version: '0.1.15' // Use JUnit test framework testImplementation 'junit:junit:4.12' testImplementation 'io.cucumber:cucumber-java:4.8.0' testImplementation 'io.cucumber:cucumber-junit:4.8.0' } cucumberReports { //doLast { //println 'tutorialspoint' outputDir = file('target/cucumber-JVM-reports') //buildId = '0' reports = files('target/cucumber.json') //} }
Hi niraj its giving me error as jvm not found
@NirajGupta
2 жыл бұрын
please send me entire error message
Could you please share your Github repository
@NirajGupta
4 жыл бұрын
which code do you need?
@MuraliRajamanickam
4 жыл бұрын
@@NirajGupta BDD cucumber framework, including cucumber reporting
@NirajGupta
4 жыл бұрын
@@MuraliRajamanickam github.com/callnirajgupta/CucumberSelenium
Hi Niraj. Thank you for the video. It helps me to configure the Cucumber Reporting for Karate Framework. I need one help. The import files are not visible in your video in RUNNER file 'TestRunner.java.' It will be helpful if you can share the TestRunner.java file
@NirajGupta
4 жыл бұрын
Sure I will shortly
@NirajGupta
4 жыл бұрын
package com.AbstractSubmission.action; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.runner.RunWith; import cucumber.api.CucumberOptions; import cucumber.api.junit.Cucumber; @RunWith(Cucumber.class) @CucumberOptions(features = "src/test/resources/Featurefile/", tags = { "@table1" }, plugin = {"pretty", "html:target/cucumber-html-report", "json:target/cucumber.json", "junit:target/cucumber.xml"}, glue = { "com.learn" }) public class TestRunner { @BeforeClass public static void beforeall(){ System.out.println("Before all suit"); } @AfterClass public static void all(){ System.out.println("After All Suit"); } }
@rkiran416
4 жыл бұрын
@@NirajGupta what is the relevance of property buildSuccessOnTestFailure?
@NirajGupta
4 жыл бұрын
@@rkiran416 if test fail then also report will generate .if you have used attribute in surefire then no need to mention
Can u share the pom.xml file
How to generate reports for python BDD, Please help
@NirajGupta
4 жыл бұрын
I am work on it.Give me some time
Hi Niraj,Is there a way to merge multupe cucumber jvm report into one.Please share if any.Thanks in Advance.
@NirajGupta
3 жыл бұрын
Just update the plugin it will merge multiple json into single JVM report net.masterthought maven-cucumber-reporting 5.0.0 execution verify generate cucumber-jvm-example ${project.build.directory}/cucumber-JVM-reports true 42 false ${project.build.directory} **/*.json true true
@sanjeets93
3 жыл бұрын
@@NirajGupta Many thanks Niraj.
Can we do similarly for pychram ?
@NirajGupta
4 жыл бұрын
Are you trying in python or java
@satishtesting19
4 жыл бұрын
@@NirajGupta Python. if you already have content how to do in python. please share me the link
@NirajGupta
4 жыл бұрын
@@satishtesting19 Python I am working on it.
@satishtesting19
4 жыл бұрын
@@NirajGupta Can you do a presentation using pycharm comunity version. how to execute BDD framework
@NirajGupta
4 жыл бұрын
@@satishtesting19 sure
Could you share with us the source code ?
@NirajGupta
5 жыл бұрын
We need only the runner class and pom.xml to generate this report.Please find the Pom.xml Please add this plugin in ypur pom.xml net.masterthought maven-cucumber-reporting 3.6.0 execution verify generate cucumber-jvm-example this is similar report as jenkins report ${project.build.directory}/cucumber-JVM-reports ${project.build.directory}/cucumber.json true true 42 you can change the path of cucumber.json report and cucumber JVM report according to your need
@sandeepmk6861
5 жыл бұрын
@@NirajGupta Could you please provide the equivalent gradle script please(gradle.build)
@NirajGupta
4 жыл бұрын
@@rebekamontana7656 Please watch this video-- for merging multiple report in single report kzread.info/dash/bejne/qXqCqqiEpdu5ddo.html
how can i use this using gradle
@NirajGupta
4 жыл бұрын
Please comment for gradle
@NirajGupta
4 жыл бұрын
Please look comment for gradle
@NirajGupta
4 жыл бұрын
plugins { // Apply the java-library plugin to add support for Java Library id 'java-library' //id "net.masterthought.maven-cucumber-reporting" version "5.0.0" //id "com.github.spacialcircumstances.gradle-cucumber-reporting" id "com.github.spacialcircumstances.gradle-cucumber-reporting" version "0.0.11" } repositories { // Use jcenter for resolving dependencies. // You can declare any Maven/Ivy/file repository here. mavenLocal() jcenter() gradlePluginPortal() mavenCentral() //maven { url 'plugins.gradle.org/m2/' } maven { url "plugins.gradle.org/m2/" } } dependencies { // This dependency is exported to consumers, that is to say found on their compile classpath. api 'org.apache.commons:commons-math3:3.6.1' // This dependency is used internally, and not exposed to consumers on their own compile classpath. implementation 'com.google.guava:guava:28.0-jre' // mvnrepository.com/artifact/net.masterthought/cucumber-reporting //compile group: 'net.masterthought', name: 'maven-cucumber-reporting', version: '5.0.0' //compile group: 'gradle.plugin.com.github.spacialcircumstances', name: 'gradle-cucumber-reporting', version: '0.1.15' // Use JUnit test framework testImplementation 'junit:junit:4.12' testImplementation 'io.cucumber:cucumber-java:4.8.0' testImplementation 'io.cucumber:cucumber-junit:4.8.0' } cucumberReports { //doLast { //println 'tutorialspoint' outputDir = file('target/cucumber-JVM-reports') //buildId = '0' reports = files('target/cucumber.json') //} }
@kowsalyavijayan2024
4 жыл бұрын
Niraj Gupta thank you sir. One more question . My mgmt wanted to change the title in the report change feature in report to test case .is it possible to edit the jar and can u please give me an idea please
@NirajGupta
4 жыл бұрын
@@kowsalyavijayan2024 Feature can't be renamed because in cucumber we refere as feature