Learning Cypress Automation With Cypress Studio

At BizStream, Cypress Studio has significantly improved the efficiency of QA testing by automating repetitive tasks and simplifying script generation; for more details, keep reading.

Just like in the world of development, efficiency and speed are integral parts of the QA process at BizStream! In the never-ending process of improving our speed and efficiency, we reached a point where we knew automation could help enhance our testing. More specifically, we wanted to improve and automate our manually repetitive and regression types of testing. A variety of languages and testing tools were explored to help us do just that. After some searching, a colleague of mine, Tyler Pfohl, came across Cypress.

As a non-developer, it has been quite an adventure (and a steep learning curve), but it has also been a lot of fun learning a coding language. Haha…what I am really trying to say is that it does not look like I am going to be a developer anytime soon. How do you bridge that learning gap without slowing down your QA process? Letā€™s welcome to Cypress Studio!

Back in January, Cypress released a new feature calledĀ Cypress Studio. With the help of a starter script, as shown below, you can start a screen recorder that will record your keystrokes and user movements around a site. Cypress Studio takes those recordings, converts them into Cypress commands, and places them right into your script. This has really helped me learn a variety of those commands that are useful for other scripts I am working on. Slowly but surely, I can start editing scripts on my own using the commands I have learned. The recorder also allows for a quicker turnaround time when getting an automated test up and running.

screenshot of code

There is a little bit of learning involved with getting Cypress itself started up, butĀ Cypress Docs has some great documentation to help get you up and running. With Cypress and Cypress Studio running, you can run your startup script. Within the Cypress Test Runner, there is now a little magic button that allows you to start recording, as seen here. Follow the prompts and start recording your script.Ā 

"Add Comment" callout highlighted in a screenshot

Cypress Studio in Action

Letā€™s say you have been hearing about how awesome this team at BizStream is, so let’s check them out! Using that magical ā€œAdd Commands to Testā€ button in Cypress Studio, here is a small script that would take you to the BizStream team page so you can check out the team. The generated code is even inserted with comments so that you know where the generated script has been added.

screen capture of code with a highlighted box around some of the code

With some basic Cypress familiarity and the use of Cypress Studio, I was able to generate a reproducible automated script within minutes. With a script now in hand, you can easily go back to review and make sure items like your URLs and element selectors were recorded correctly. Additional assertions or commands can also now be added to your script and then simply just re-run it from there. Overall, Cypress Studio has proven to be a very useful tool in growing my Cypress skills over the past few months. Happy scripting, everyone!

About the Author

Josh Trench

Josh hails from the early days of BizStream. Josh was brought back to drive developers crazy with endless screen captures and loads of constructive criticism. When he’s not finding software bugs, you will most likely find him running around, making sure our building is in prime condition. Outside of work, Josh can be found, exploring the Grand Rapids scene with his wife, Rori. He also enjoys backpacking, restoring estate pipes, practicing surfing, and finessing his mountaineering skills.

Subscribe to Our Blog

Stay up to date on what BizStream is doing and keep in the loop on the latest in marketing & technology.