Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Skip a Cypress Test in Commandline

I have a cypress integration test that I do not want to run in my CI/CD pipeline. I know I can use .skip() function to skip the test but what I am looking for is a way to exclude the test by passing some command line argument itself(like we have in case of Xunit test cases). Is there any way to do that?

like image 264
Leo2304 Avatar asked May 18 '26 11:05

Leo2304


1 Answers

You can specify the tests you want to be run by using the cypress run --spec option. So you can move the tests you want to run into their own folder, 'cypress/integration/testsToRun/**/*' for example, and Cypress will run only the specified tests and skip the rest.

like image 87
ShortM Avatar answered May 21 '26 00:05

ShortM



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!