Regression testing is an incredibly useful process to add to your website development schedule, especially if it is orchestrated in an automated manner. It can help you identify potential issues or bugs in your code before it gets deployed to the live environment and able to impact your users. There are several aspects of regression testing you should consider employing to ensure that your testing plan is as effective as possible.
Automate Your Testing
As I mentioned above, automating your regression testing plan can be very beneficial to the efficacy of your bug catching activities. The first reason is that human error can cause small bugs in your code to be missed and get deployed to your website. Even the most dedicated human tester is still just a fallible human, and may eventually get complacent or forget a testing step. Computers don’t get bored, and as long as you write good tests and automate them, the testing software will run them the same way every time.
From a quantity standpoint, automating your tests might be the only feasible way to conduct them if you have a portfolio of hundreds of test assertions. For a moderately sized website with rich features like an e-commerce portal and integrations with other third-party systems, it is not unreasonable to foresee having dozens of tests. The more detailed and varied your tests are the safer you can feel about the stability of your codebase, and automating your testing can make sustaining all of that more manageable.
Focus on Critical Paths
If you feel you could potentially exceed the maximum reasonable amount of tests you can manage, then focusing on the critical path elements of your website or app is a necessity. The critical path will be a collection of all the pages, tasks, and forms which comprise the core features of the site. In other words, the features that must be working every day in order to justify the reason for it to exist in the first place. Examples of critical paths usually include processes like an e-commerce workflow beginning from select a product all the way to completing the checkout process. You can have one or more critical paths as it is entirely relevant to what is important to your system.
Regularly Update Your Tests
As your website or app changes, your tests will need to be updated as well. This is an area where having a multitude of tests can start to be an issue with sustainability, as the time investment will grow along with the size of your test portfolio. However, it must be stressed that you cannot neglect the periodic evaluation of the tests you have created. In order to make this process more manageable, it can be helpful to use a taxonomy or categorization system in order to classify what parts of your software the tests correspond to. The more documentation you create that explains what and where tests are tied to your system, the more confident you can be later at updating them to stay current with new or revised features.
Write Meaningful Tests
One of the most important considerations to keep in mind when writing tests is that they must be above all meaningful and robust. A test is only as useful as it is strict at being successfully completed. If you make your tests simple to prove correct, then you are making the process of creating tests easy but ultimately cheating yourself out of the rigorous evaluation of your system.
This calls to mind an experience I had once with one of my daughters. I was trying my best to get this toddler to finish eating her dinner, which if you have any experience of that sort you’ll know it can often be a challenge. One of the easiest solutions is to offer a bribe, and I promised her she could eat her dessert as soon as she finished her dinner and I quote, “made it all gone”. Surely enough I was soon outsmarted by a two-year-old when she picked up her plate of food, calmly walked over to the kitchen trash can, and threw it all away. Proudly, she declared she “made food all gone” and demanded I hand over her dessert.
The moral of this story is that those who are lazy with their test assertions will soon find that their passing tests do not guarantee stable and functioning application. Following this guideline and the other best practices mentioned above will help ensure that your testing practices are not only valuable but also efficient and easier to manage.