Use cy.skip in order to skip a test in a cypress suite (2024)

Tomasz Łakomy: [0:00] We have a couple of tests in our Cypress Suite. If I restart all of them, we're going to see that one of them is a very long test, because basically, it's going to wait for 10 seconds and do nothing at all. Obviously, we need to improve it for a bit.

[0:11] Suppose we wanted to push all those changes to our Git repository. One way we could solve that is basically to comment out the test, but this is not perfect. Instead, we can do it.skip, which is going to run all those tests without this one, because it's going to skip it.

[0:26] Of course, we shouldn't skip every single test that we have problems with. Nevertheless, if you want all those other tests to start being as value, sometimes it is worthwhile to skip one of those tests, and fix that as soon as we can.

Use cy.skip in order to skip a test in a cypress suite (2024)
Top Articles
Latest Posts
Article information

Author: Gregorio Kreiger

Last Updated:

Views: 6090

Rating: 4.7 / 5 (57 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Gregorio Kreiger

Birthday: 1994-12-18

Address: 89212 Tracey Ramp, Sunside, MT 08453-0951

Phone: +9014805370218

Job: Customer Designer

Hobby: Mountain biking, Orienteering, Hiking, Sewing, Backpacking, Mushroom hunting, Backpacking

Introduction: My name is Gregorio Kreiger, I am a tender, brainy, enthusiastic, combative, agreeable, gentle, gentle person who loves writing and wants to share my knowledge and understanding with you.