Cucumber_BDD_Reports-Part 2

Tutorial 12​​ ​​ ​​ Cucumber​​ Reports​​ – Part 2

This tutorial is continuation of previous tutorial. So please read the previous tutorial before you read this one. ​​ 

What you will Learn :

  • Publish report on cucumber cloud​​ by changing cucumber.properties

  • ‘dryRun = true’ cucumber option

Publish report on cucumber cloud​​ by changing cucumber.properties

Before we start, let​​ us​​ first​​ comment the line ‘publish = true’

Save the file

Run the Test runner file

If you look at the console output​​ below,​​ we can also make a​​ property setting​​ inside the file cucumber.properties under src/test/resources folder

So let us create cucumber.properties under src/test/resources folder

As seen below, we do not yet have resources folder under src/test/

So let us first go to src/test folder. To find the location of src/test folder, right click src/test/java, you will find ‘Properties’​​ 

Click ‘Properties’

Select and copy the ‘Location’ upto src/test as seen below

 ​​​​ ​​ 

Open windows explorer and paste the above location, hit ‘Enter’​​ 

Create a new folder ‘resources’

Next, right click Cucumber project in eclipse > Maven > Update Project (see below)

You will get the below popup

Click OK

You will now see src/test/resources folder

Next, right click src/test/resources folder > New > File (see below)

Mention the file name

Click Finish

The below window would come up

Next, copy the below from the console log

Paste it in properties file

Save the file

Run the Test runner file

Copy the report link from console

Open the report in a browser

Like we have seen in previous tutorial, we can click the feature file to see the scenarios

‘dryRun = true’ cucumber option

This option will help us identify those steps in the feature file which do not have corresponding step definition method. Let us see that.

The below Test runner file is mapped to Tag.feature

Let us open Tag.feature file and add a new step as shown below

Save the file. So this step does not have any method in the step definition file

We now​​ make ‘dryRun = true’ setting in Test runner file

Save the file and run it

Notice that​​ the console shows​​ ‘null’​​ against the new step. This​​ ‘null’​​ means that there is no step definition method for this step. The left hand side section of the console shows the scenario steps and the right hand side shows the corresponding method name in the step definition file

Also​​ as seen below, the Junit Runner console suggests us to add the missing method in step definition file

Thank you​​ for reading!

Share On

Share on facebook
Share on twitter
Share on linkedin
Share on whatsapp
Share on tumblr
Share on email

Leave a Comment

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

Scroll to Top

Lifetime Membership Club

LIFETIME MEMBERSHIP BIG SALE - ALL LIVE COURES JUST - 7000 RS/ 99 USD
Attend All Live courses in just 7000 rs / $99 - offer ends 10th Nov 2024