Testing is a crucial part of the software creation process. It ensures that your code is working correctly and that all bugs are found before the software lands in the hands of consumers. But it can be difficult to explain these tests and their results to investors...
We live in an agile world, where features are developed and released incrementally based on growing customer needs. Automated tests have become a key component in this process to ensure defects are found as soon as a new feature is developed and the application code is checked in. These automated tests could be a mixture of a unit, API and UI-level tests. They have kicked off automatically as part of the CI/CD pipeline, which has become mandatory in environments with rapid release cycles.
Most organizations realize the importance of automated tests, and a considerable amount of time and effort is spent in hiring skilled engineers to write these tests. But once the tests are written, teams have challenges figuring out how to integrate them into the existing CI/CD pipeline. They need to identify what tests to run, when to run them and how to structure them to get immediate feedback on the features developed.
One approach to aid in this overall process is to categorize the tests and run them periodically during the different phases of the development process.
This diagram can help testers understand how automation fits into the various phases of the agile process:
There are typically three types of automated tests that run in a CI/CD pipeline.
High-level smoke tests
These high-level automated tests run on every code check-in to ensure the critical functionality of the system is still working as expected. This could be a mixture of UI, API and unit tests. The objective of these tests is to get quick feedback about the system, and they usually should finish running within five to ten minutes.
Daily regression tests
Daily regression tests ensure the new functionalities that were added to the system did not break existing ones. They are more detailed than smoke tests in terms of covering end-to-end flows of the system. They are usually run at least once a day and probably multiple times before a release.
These are new automated tests that are written as part of the sprint. When a new test is complete during the sprint, it gets added to the daily regression tests. They are later merged into the regression test suite, usually at the regression testing phase.
In the regression testing phase, all of the above automated tests are still running in parallel with manual testing. In the acceptance testing phase, the teams have high-level acceptance test plans that are executed to ensure the critical functionalities of the system are still working as expected after the new features have been merged into the main code branch. The smoke and regression tests are also run again in parallel.
Throughout this process, teams continue to do manual scripted testing, exploratory testing, and risk-based testing, depending on the project timeline and resources available in conjunction with automation.
Writing automated tests is just one aspect of test automation. Teams need to start thinking on a much broader scale in terms of getting maximum coverage and quicker feedback for the time and effort spent on writing these tests.
All the approaches described above become more relevant as teams try to release faster by implementing a seamless CI/CD pipeline.
Some teams may be bigger than others, the applications could be more complex, and organizations can range in size from huge companies to startups. But no matter what, the process still remains the same: Teams need to collaborate and figure out a set cadence to organize and run the automated tests as part of their CI/CD pipeline.
There are more varied facets to test automation than just writing code. Apply these principles based on your context.
Gherkin: Overview, Use Cases, and Format
Gherkin is a format used for cucumber testing. In this article, we go over what it is, its use cases, and the format of Gherkin.
The Importance of SQL Injection Testing
SQL injection testing is important for finding vulnerabilities and keeping your information secure. Learn more here.
6 Best Practices for Code Review
Code review is a daunting process, but there are ways to make it easier, more efficient, and more accurate. Learn more here.