Harry
Harry

Reputation: 31

Scenarios from cucumber .feature file not running

I have hundreds of feature files, all under same folder structure,Most run fine (using Junit) but some of them just do not run. All I get in console output is:-

     Feature: Verify  Customer Registration/ Sign Up

    @Web @Regression @P-High 
  Scenario: Verify the available fields on the Sign Up page

    Given user launches the browser and navigates to "HOME" page

    When user clicks on SignIn link from global header

    And clicks on SignUp link from SignIn page

    Then Verify below Sub/Main Module of My Account


0 Scenarios ()
4 Steps (5 skipped)
0m0.000s

I'v made sure that all the steps have stepdefinitions glued to it.

package com.aso.qe.test.runner;
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;

@RunWith(Cucumber.class) @CucumberOptions(

    features="src/test/resources/features/web",
    glue="com.aso.qe.test.stepdefinition.web",
    tags = "@P-High",      
) 
 public class WebTestRunner{     }

Every feature file with tag @P-High has same issue while every other feature file without this tag runs just fine.

Upvotes: 1

Views: 2699

Answers (1)

Harry
Harry

Reputation: 31

It turned out Not to be a tag or code issue. Each one of those files not running had scenario details on next line instead of right in front of keyword scenario (see example).

Scenario:
Check Flight Status

Once I fixed above everything was smooth.

Upvotes: 1

Related Questions