Bratok17
Bratok17

Reputation: 53

why cucumber test results don't display examples name or steps?

I've ran into some unexpected results running a project with cucumber 2.0+. I discovered when running my tests as Junit, the immediate output doesn't display the "Examples" names or steps, instead it repeats the "Scenario outline" name for each line of "Examples" table. As practice I tried running the demo project for Screenplay pattern "TODOMVC" from https://github.com/serenity-bdd/screenplay-pattern-todomvc, using the following dependencies for cucumber

<dependency>
   <groupId>io.cucumber</groupId>
   <artifactId>cucumber-java</artifactId>
   <version>2.4.0</version>
</dependency>
<dependency>
   <groupId>io.cucumber</groupId>
   <artifactId>cucumber-junit</artifactId>
   <version>2.4.0</version>
   <scope>test</scope>
</dependency>

I've tried executing the runner with (CucumberWithSerenity.class) as well as (Cucumber.class) And this is how the JUNIT looks in my Ecplise.

Junit report in eclipse

Executing the runner using the old info.cukes dependencies (1.2.5) produce result with example names and steps as expected.

Just wondering if anyone else has ran into this issue, or if I'm missing something?

Upvotes: 1

Views: 2745

Answers (2)

Ramesh Korla
Ramesh Korla

Reputation: 64

In that case, you have add the below line of code stepNotifications=true in your TestRunner file

Upvotes: -2

Bratok17
Bratok17

Reputation: 53

It looks like its intended behavior in the new cucumber version. Sort of a quick-fix solution is to add junit = "--step-notifications" in the cucumberoptions, which will display the steps, but still no luck with showing the example names.

Upvotes: 3

Related Questions