I'm trying to use ignoreTestFiles
in cypress so that incomplete tests will not get run in the test suite.
The path to my tests is:
C:\Users\userA\IdeaProjects\automated_tests\cypress\integration\ignoredTestFiles
In cypress.json
, I have the following entry:
"ignoreTestFiles": "*ignoredTestFiles*"
I used Globster to verify the minimatch, and it says its correct. But when I run my tests, these files are not getting ignored.
skip in order to skip a test in a cypress suite.
Cypress executes the support file before the spec file. For example, when Cypress executes a spec file via cypress open or cypress run , it executes the files in the following order: e2e example: support/e2e.
cypress run --spec <spec> Run tests specifying multiple test files to run.
You can also pass array
like:
{
"ignoreTestFiles": [
"**/1-getting-started/*.js",
"**/2-advanced-examples/*.js"
]
}
You need to specify a match for files, so I suggest you to add *.js
to your expression.
Also, you need to add another *
to match any sub-directory structure, try this expression instead:
"ignoreTestFiles": "**/ignoredTestFiles/*.js"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With