SPR Opinion: Ultimate Best Practices for Test Optimization
While trends in software testing are always changing, we believe the core values, best practices, and approaches remain true guiding foundations. Some of these best practices are outlined in the blog Doing More with Less: Optimize your Testing Practices. These tips are:
- Build and clean up your centralized team repository.
- Always take care of your regression suite
- Report on coverage
- Upgrade your tools
- Clean up your code
- Optimize execution times
- Improve reporting
I recently talked with a few of the SPR Software Developers in Test (SDET) to discuss which of the 7 best practices for testing optimization they thought were most important. Here’s what they had to say.
Hugh Tietze, SDET at SPR
Top lesson: Clean up your code
One lesson I learned early in my testing career is the importance of writing clear and concise bug details. This is crucial because you might not have another opportunity to demonstrate the issue or explain your actions to the person responsible for solving it.
This principle applies to coding as well, especially for consultants who frequently change clients and teams. Tribal knowledge often leaves with the consultant, so it's vital to leave behind well-documented and clearly written code. Reliable comments and readable code can save significant time for those who come after us and need to work with or support our projects.
It is essential for client personnel and other testers on the team to be able to follow and build upon your work. When your tests and code are understandable, the reliance on any single person is reduced. Lack of documentation can make this very challenging, especially when test resources are limited. This often leads to an over-reliance on one individual, which slows down the entire process.
Madalina Lazar Halitchi, SDET at SPR
Top Lesson: Always take care of your regression suite
I consider taking care of your regression suite to be the most impactful best practice because it inherently involves code maintenance, test coverage, and test data management. In an Agile environment, where the regression process occurs each sprint, neglecting the regression suite can significantly impact test results, as newly built components may not be tested properly, if at all.
A well-maintained regression suite increases the likelihood of detecting newly introduced defects early. This allows for fixes before the defects reach the end user in production or even your testers in UAT. Early detection helps companies avoid unnecessary financial costs, project delays, user dissatisfaction, and potential damage to the company's reputation, team productivity, or security.
These reasons highlight why companies are heavily investing in testing. Maintaining the existing regression suite should be a top priority for any testing team to ensure quality and efficiency.
Melissa McElroy, Sr. Director at SPR
Top Lesson: Report on Coverage
Reporting is crucial for understanding the health of your application. It's important to report on the right metrics and identify thresholds to determine where action needs to be focused.
Imagine this scenario: you just completed the UAT deployment of a major release and re-ran all of your tests. The results look great, just as they did in your lower-level environment. However, once users begin testing some of the new features, issues start emerging. What happened? Perhaps your regression suite was up to date, but tests weren’t written for some of the new features. Or maybe there’s an entire module that hasn’t been modified in so long that you don’t even have regression tests for it, and one of the changes had a downstream impact. Regardless of the cause, you have a test coverage problem.
Generally, your test coverage target does not need to be 100%. Achieving 80% coverage with quality tests for your most important features will suffice, supplemented by manual efforts. Identifying this type of issue can also highlight other areas for improvement, such as ensuring test creation is ingrained in your development processes and focusing manual testing efforts on the non-covered areas earlier in the process.
After digesting the responses, all these best practices are intertwined. Test coverage issues could identify misses in regression tests. Keeping your regression tests up to date helps you maintain test coverage thresholds and clean code. Healthy test suites and clean, reliable, commented code will support optimization execution times. So, even when your team is functioning well or you're focused on implementing a new release or transitioning approaches to a new tool, don’t lose sight of the basics. No matter your testing strategy, they remain the foundation of successful application delivery.