Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to exclude spec files from test runs in cypress

I want to be able to exclude particular spec files from my test runs in cypress. I guess this will be some config entered into the cypress.config.ts file. All I have found is the excludeSpecPattern argument but this seems to be to exclude file patterns, not specific files/folders.

like image 471
Eoin Corr Avatar asked Oct 29 '25 07:10

Eoin Corr


1 Answers

You can use excludeSpecPattern and define exact folders or files.

excludeSpecPattern: [
    '*/*/**/spec.cy.ts',
    '*/**/FolderToExclude'
],

If this doesn't work, then the defined path is wrong. Maybe this link will be helpful:

https://docs.cypress.io/guides/references/configuration#excludeSpecPattern

like image 97
Eva-Anna Klugman Avatar answered Oct 31 '25 11:10

Eva-Anna Klugman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!