Just like in the world of development, efficiency and speed are integral parts of the QA process at BizStream! In the never-ending process to improve our speed and efficiency, we got to 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. It immediately started to check a lot of boxes for us, as mentioned in his blog post, Cypress Automated Testing for Kentico 12.
As a non-developer, it has been quite an adventure (and a steep learning curve) but 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 in 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 am able to start editing scripts on my own from those commands that I have learned. The recorder also allows for a quicker turnaround time in getting an automated test up and running.
There is a little bit of learning involved with getting Cypress itself started up, but Cypress Docs have 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.
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.
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!