Cypress: run only one test

前端 未结 6 1212
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-31 07:04

I want to toggle only running one test, so I don\'t have to wait for my other tests to see the result of one test.

Currently, I comment out my other tests, but this is r

6条回答
  •  后悔当初
    2021-01-31 07:40

    There are multiple ways of achieving this.

    1. You can add .onlyto it or describe see @bkucera answer
    2. You can do it from the terminal as explained in the doc here
       npx cypress run --record --spec "cypress/integration/my-spec.js"
      
       npm run cypress -- --record --spec "cypress/integration/my-spec.js"
      

提交回复
热议问题