admin管理员组文章数量:1287579
How to skip a feature in cypress so that its not tested for end to end tests
Tech: Angular 8 with cypress versions:
- "cypress": "^3.4.1"
- "cypress-cucumber-preprocessor": "^1.16.2"
- "cypress-pipe": "^1.4.0"
I'm using cypress with its test runner (./node_modules/.bin/cypress open).
I'm having trouble skipping a test. I understand how to @focus on a feature like so:
Feature: App is alive
checking data
@focus
Scenario: Read list of data
Given I open up the page
Then I see more than one row of data
I've tried changing @focus to @skip and @skipped but didnt work
How to skip a feature in cypress so that its not tested for end to end tests
Tech: Angular 8 with cypress versions:
- "cypress": "^3.4.1"
- "cypress-cucumber-preprocessor": "^1.16.2"
- "cypress-pipe": "^1.4.0"
I'm using cypress with its test runner (./node_modules/.bin/cypress open).
I'm having trouble skipping a test. I understand how to @focus on a feature like so:
Feature: App is alive
checking data
@focus
Scenario: Read list of data
Given I open up the page
Then I see more than one row of data
I've tried changing @focus to @skip and @skipped but didnt work
Share Improve this question edited Oct 15, 2019 at 13:58 AngularM asked Oct 15, 2019 at 13:49 AngularMAngularM 16.6k29 gold badges102 silver badges175 bronze badges1 Answer
Reset to default 8Sure you can use tags :
Feature: My very feature
@ignore-this
Scenario: I don't want to run
Given I open up the page
Then I see more than one row of data
Scenario: I want to run
Given I open up the page
Then I see more than one row of data
Then run Cypress and setting env TAGS accordingly:
./node_modules/.bin/cypress open -e "TAGS=not @ignore-this"
If you want an entire feature to be ignored when using cypress run, you can use cucumber tags wrapper (it won't work with 'open' mand, see:cypress-tags.js)
./node_modules/.bin/cypress-tags run -e TAGS='not @ignore'
References: - https://github./TheBrainFamily/cypress-cucumber-example#tags-usage
本文标签: javascriptHow to skip a feature in cypress so that its not tested for end to end testsStack Overflow
版权声明:本文标题:javascript - How to skip a feature in cypress so that its not tested for end to end tests - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741262151a2367826.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论