Cypress-cucumber-preprocessor: Tags functionality is not working as expected:No matching tags found

Created on 6 Jan 2021  路  5Comments  路  Source: TheBrainFamily/cypress-cucumber-preprocessor

Current behavior

Desired behavior

Tags functionality is not working as expected:No matching tags found
When i use npx cypress run -e TAGS='@LoginScenario' all feature file scenarios are getting executed .
Please let me know any solution for this.

Test code to reproduce

Feature: Google Functionalities

@LoginScenario
Scenario: Verify Login Functionality
Given user navigates to Login page
And user enters valid credentials
Then User is able to login in to application

on Terminal::
npx cypress-tags run 'TAGS=@LoginScenario' --browser chrome
Using cypress.json configuration:
Spec files: {cypress/integration//.{feature,cypress/integration/features}}
*
No matching tags found

Versions

  • Cypress version:^5.5.0
  • Preprocessor version:4.0.0
  • Node version:14.15.1

Most helpful comment

@antonversal while that solution works if all you have it .feature files it can be solved to use the correct glob by using an array, like so:

"testFiles": ["**/*.{feature,features}"],

This is because the preprocessor will split testfile string on ,, but leave arrays alone.

Using that config the spec files output will work:

Spec files:  cypress/integration/**/*.{feature,features}

All 5 comments

Any update on this issue ??

Try this command instead:
npx cypress-tags run -e TAGS="@LoginScenario" --browser chrome

I tried the above suggestion, but it does not solve the issue.

It looks like how cypress-tags matches spec files changed.
You need to fix testFiles in cypress.json:
from:

"testFiles": "**/*.{feature,features}",

to something like this:

"testFiles": "**/*.feature",

You can see which spec files are mutched from cypress-tags output,
before the fix:

Spec files:  {cypress/integration/**/*.{feature,cypress/integration/features}}

after:

Spec files:  cypress/integration/**/*.feature

@antonversal while that solution works if all you have it .feature files it can be solved to use the correct glob by using an array, like so:

"testFiles": ["**/*.{feature,features}"],

This is because the preprocessor will split testfile string on ,, but leave arrays alone.

Using that config the spec files output will work:

Spec files:  cypress/integration/**/*.{feature,features}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

DanielStoica85 picture DanielStoica85  路  4Comments

badeball picture badeball  路  5Comments

flowt-au picture flowt-au  路  3Comments

PrinceJohn picture PrinceJohn  路  3Comments

NoNameProvided picture NoNameProvided  路  8Comments