Cypress-cucumber-preprocessor: While running scenario with specific tag others are marked as pending in results

Created on 27 Aug 2020  路  3Comments  路  Source: TheBrainFamily/cypress-cucumber-preprocessor

Current behavior

This feature file has two tests marked with tags @smoke and @Regression. I'm running command npx cypress-tags run -e TAGS='@smoke' to run only scenario marked with tag @smoke. This command runs the desired scenario but marks others as pending. Example of the result shown in the below image
https://ibb.co/CPfqzLv

Desired behavior

Scenarios that are not executed should not show in the results.

Test code to reproduce

Google.feature

Feature:  The Facebook

  I want to open a social network page

  @smoke
  Scenario: fhgfh a social network page
    Given I open Google page

  @regression
  Scenario: sd a social network page
    Given I open Google page

Step definition:
Givens.js

const url = 'https://google.com'
Given('I open Google page', () => {
  cy.visit(url)
})

Versions

  • Cypress version:5.0.0
  • Preprocessor version: ^2.5.5
  • Node version: v12.16.3

Most helpful comment

I think they should be marked as "Skipped" instead of "Pending". Otherwise the Cypress test output looks incorrect (as if tests are hanging instead of not running).

All 3 comments

I think they should be marked as "Skipped" instead of "Pending". Otherwise the Cypress test output looks incorrect (as if tests are hanging instead of not running).

I think they should be marked as "Skipped" instead of "Pending". Otherwise the Cypress test output looks incorrect (as if tests are hanging instead of not running).

This isn't something we chose. See eg. https://github.com/cypress-io/cypress/issues/3092 and https://github.com/cypress-io/cypress-documentation/issues/593.

It seems like you have multiple test suites that you commonly run separate from each other, making the "pending output" seem like a polution. I get that, but why do you have separate types of tests gathered in a single test suite? Split them up and use eg. an environment variable to specify testFiles matching only the desired tests.

Was this page helpful?
0 / 5 - 0 ratings