cypress-grep icon indicating copy to clipboard operation
cypress-grep copied to clipboard

Only Run One Test in a Suite

Open DPC15038 opened this issue 2 years ago • 5 comments

I'm not sure if this is by design, but I have a test file like this:

describe('My Test', { tags: '@myTag' }, () => {
     it('checks some data', { tags: '@tag1' }, () => {
       ...
     },

     it('checks some different data', { tags: '@tag2' }, () => {
       // I only want this specific test to run 
       ...
     }

When I run this command npx cypress run --env grepTags=@tag2,grepFilterSpecs=true,grepOmitFiltered=true,env=dev both of the it tests run.

Is there any way to only run the exact tests that match the grepTag?

DPC15038 avatar Sep 15 '22 20:09 DPC15038