My favourite VS Code extensions for writing tests in Cypress

That’s what we needed, right? Another VS code extension blog 😂But I guess I got your attention, so why not share a little bit of my workflow? This one is for all you testers and developers writing tests in Cypress.

Here’s to the lazy ones among us 🍻Add .only extension does exactly what it claims to do. It filters your test by adding .only keyword to your it() block. It’s about 1 second faster than typing it yourself. Use that time well.

This plugin actually saves you more than 1 second, and maybe even a couple of minutes. Depends on how many tests you write. These snippets help you create a quick describe() or it() block, and can create a combination of these two for you. You can quickly create a before() or beforeEach() hook. And after() too.

With many tests in one spec, you might want to look into just the names of your tests. If you wan’t to fold all your it() blocks, you might find Fold plus extension really useful. Works something like this.

With all the different code blocks, it is easy to get lost in all the brackets. If you are like me, and like to move stuff around, chances are you will forget a bracket pair spend couple of days trying to find out which one is missing (or extra). With highlighting code blocks, it may take a little less.

Just a nice little addition to your VS code. To keep things organized different folders get different icons. Cypress-related files and folder get a nice little Cypress icon, so you can find them more easily.

If you like Cypress and want to learn something about it, follow me on Twitter, I like to send out various Cypress tips. Also, you can check out my course on Udemy, which is a short, straight to the point course that is focused on learning by doing, and giving practical examples on test automation in Cypress.

If you liked this article, you’re going to love . It’s called test automation for people in a hurry, and it is exactly what you’d expect. A compact, fast and straight-to-the-point course with lots of practical examples and challenges.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Filip Hric

QA lead at Slido | Psychology graduate | Music geek | Cypress ambassador