Streamlining software testing with Cypress automation tool and ChatGPT
I take pride in my ability to identify issues and provide detailed reports to help improve the quality of software products. I’m always eager to learn and keep up with new technologies and testing methodologies.
As a quality assurance engineer at Dizzain, I have experienced firsthand the evolution of software testing.
For most of my career, I focused on manual testing of web and mobile applications. My team would meticulously gather requirements, craft comprehensive test cases, and execute them by hand, documenting any issues along the way.
But over time, as our team and projects grew more complex, I realized the limitations of manual testing. We needed to optimize our processes, which led me to champion adopting test automation.
In this case study, I will detail Dizzain’s transition from manual to automated testing using the open source Cypress automation tool. I’ll discuss the pain points we aimed to solve, how we implemented automation, and the phenomenal benefits we’ve reaped – including faster testing, better coverage, and improved software quality.
For any software team plagued by the challenges of manual testing, I hope this case study provides ideas and inspiration for leveling up with test automation.
The manual testing era
Transition to test automation
The automated testing process
The Manual Testing Era
In the early days of my QA career, every aspect of testing was done manually. While meticulous, manual testing became increasingly cumbersome over time.
The first step was always gathering requirements. We would have long discussions with product managers, developers and UX designers to understand the functionality being built. I created detailed matrices tracking every requirement, both new features and updates. This documentation was crucial for building effective test plans.
Creating Checklists for Testing
With requirements in hand, I developed comprehensive test cases to validate the expected behavior. Test cases focused on both positive scenarios, confirming the software worked as intended, as well as negative scenarios, ensuring the software responded properly to bad data or erroneous usage.
We also maintained a regression test suite to re-validate existing functionality anytime something changed. I was proud of our extensive test coverage.
Despite our rigorous manual testing procedures, as our software projects grew more complex, limitations became apparent:
Repeating the same test cases was extremely tedious and time-consuming.
Ensuring thorough regression testing with every change was difficult.
Testing complex interfaces manually overlooked some edge cases.
We had a hard time keeping up with the pace of development.
Scaling testing as projects grew meant hiring more QA engineers.
As a company we realized we needed to optimize our processes to overcome these roadblocks and I had an opportunity to lead the automation effort.
Transition to Test Automation
I was tasked with researching and identifying the automation framework which is best suited for the types of projects that we develop at Dizzain – usually fast paced, highly interactive web experiences; projects executed by small teams with hard deadlines.
The Search for Optimal Automation Platform
Automated testing has been around for quite a while. Selenium has been used since mid-2000s for automating web project testing, while Calabash has emerged as a framework for Android and iOS native apps testing. The adoption of continuous integration (CI) practices led to the automation of testing as part of the development pipeline.
Tools like Jenkins and Travis CI automated the execution of tests whenever code changes were made. Yet all these technologies were highly specialized and required significant training and experience to master – one had to be a developer first and QA second to use them effectively.
BDD frameworks like Cucumber and SpecFlow introduced a more business-readable way of writing tests, making it easier for non-technical stakeholders to understand and contribute to testing. Yet they also had limitations such as complexity of syntax and limited browser automation.
Choosing Cypress for Automation
After researching many options, our team agreed Cypress was the test automation framework best suited to our needs:
Open source with great documentation and community support
Designed specifically for web applications
Supports multiple testing types including end-to-end, integration, and unit testing
Robust dashboard and reporting capabilities
Built-in time travel for debugging test runs
With Cypress, we could build robust automation rapidly.
However, we moved cautiously at first. Like adopting any new technology, there was a learning curve. We needed to research tools, reshape processes, and develop new skills like writing test code. But we were determined to make it work, starting with a pilot project. The benefits became apparent quickly, and we never looked back, integrating automation into all our projects moving forward.
The Automated Testing Process
Adopting test automation required rethinking our entire QA process. Here are some of the key steps we took to integrate automation effectively.
First, we evaluated existing manual test cases to identify repetitive scenarios prime for automation. Test cases were translated into code following a consistent methodology. To supplement automated core test cases, we also maintained some manual test cases for edge scenarios.
ChatGPT to the Rescue
While I used some Python-scripting I am not a developer so writing Cypress scripts by hand would have taken a while. Instead I slightly modified my test scripts to indicate ID of page elements like buttons and textboxes and then processed through ChatGPT to generate the actual Cypress script.
That got me about 90% there and with some manual adjustments I got my scripts to work. Eventually I mastered the scripting on my own, but going ChatGPT route was a great way to bring my manual testing colleagues on board.
Organizing Tests with Cypress automation tool
To manage our growing automation suite, we organized tests following best practices like:
Logical file structure using describes and contexts
Reusable functions for common logic
Page object models for simplified selectors
Fixtures and test data for input/output validation
Consistent naming conventions and descriptions
These approaches enhanced maintainability and scalability.
While developing automated tests was a crucial first step, we also needed to tightly integrate automation into our software development lifecycle.
Continuous Integration (CI)
Adding testing into our GitLab CI/CD pipeline automated execution on every code change. Test results were required to pass before deploying builds, acting as a gatekeeper for quality.
We configured email notifications through GitLab so our team was alerted immediately if any automated test failures occurred. This enabled rapid response and resolution.
Running tests through Cypress Cloud gave us flexible, dynamic infrastructure. We could run tests in parallel, reducing execution time. The dashboard provided robust reporting and analytics.
Since implementing comprehensive test automation using Cypress, Dizzain’s software quality and development velocity has soared.
Automation has transformed QA, delivering multifaceted benefits:
Faster test execution, with more tests run earlier and often
Increased test coverage and scenarios, including negative and edge cases
Consistent regression testing on every code change
Automated gates to prevent regressions and bugs
Scalable testing without linearly growing QA headcount
Improved software quality and customer satisfaction
For any software team overwhelmed by manual testing, I strongly encourage evaluating test automation tools like Cypress. The investment pays exponential dividends in productivity, quality, and innovation. Automated testing is truly a catalyst for transforming software development.