The call for faster software testing cycles stems from business demands. Faster software testing helps to improve feedback, reveals the problems and flaws that can bog down a product, and can work to deliver faster validation during development. Accelerating the velocity of software testing can also drive developer productivity, happiness, and morale.
Quality should be a part of the DevOps process, not an afterthought. This is the culture shift of Continuous Quality. We should catch and mitigate risks as early as possible in the software development lifecycle, breeding faster feedback loops and customer delight through fewer defects.
Faster testing is better for business. By focusing on Continuous Quality, and the automation of testing cycles, developers can focus on what’s really important - writing new code and shipping new features.
If your development team feels like they are last in the race to optimizing test strategy, it’s important to point out that improving your test strategy can be an incremental process. It takes time and effort to boost and streamline testing cycles.
Development teams can increase testing cycle velocity by embracing three key fundamentals: test value, reliability, and speed.
Think quality over quantity in regards to tests you run. Evaluate the purpose of the test and focus on testing the right things, not just everything. Align this approach with the Software Testing Pyramid.
The Software Testing Pyramid gives a framework for software testing buckets, grouping test types by level of granularity and detail within the pyramid, representing common test flows. The diagrammed metaphor not only helps to visualize the different layers of testing, but it represents how much testing should be done within each layer.
The bottom layer, unit tests, are closest to the code and tested most. Higher up in the testing pyramid, integration tests are more complicated and involve additional integrations, which increase the amount of testing variables and the complexity of the tests. At the very peak of the pyramid are end-to-end tests, also known as broad stack tests, which are complex and time consuming by nature. By shifting testing left we are testing more frequently from the base of the pyramid.
Not only should development teams align their testing strategy with the software testing pyramid, but every layer of the testing pyramid should focus on running valuable software tests. Your tests should give valuable feedback regardless of how simple or complex the test type is.
Your software test cycles will run faster if your tests are reliable. If your team doesn’t trust test outputs, these flaky tests will require additional runs. It’s common practice to rerun failures automatically, and your team likely already has this incorporated into your software testing strategy. Avoiding the need for reruns all together by eliminating flaky tests would greatly improve test cycle velocity.
Finding and fixing flaky tests is a never-ending cycle that drags down developer productivity and happiness. Flaky tests result from common root causes: badly written tests, memory failures, infrastructure issues, and so forth.
Typically, to identify and classify flaky tests requires a team member with institutional knowledge who remembers the entire history of a test suite. Talk about slowing the testing cycle down.
However, perhaps the bigger issue with flaky tests is that each and every test failure requires more and more labor and time to identify the actual cause. As projects and tests grow, and flaky tests increase, developer productivity plummets and test cycle times suffer.
There’s a variety of industry approaches to flaky tests. With Launchable’s Flaky Test Insights, developers can quickly classify and eliminate flakes by identifying if a test failed due to being flaky, and ranks each test by the level of probable flakiness, flagging the top flaky tests in a test suite. This allows for the prioritization of fixing the highest probable flaky tests first, helping to improve the reliability of your software tests.
Having valuable and reliable tests will help to improve your software testing cycle velocity, but slow tests disrupt the feedback loop, causing code to ship slower. One approach to combatting slow tests is through parallel testing.
Parallel testing is the practice of dividing a test suite and testing several components of an application at the same time. In theory, parallel testing helps to run large test suites more quickly.
While parallel testing has many benefits, for some teams, running parallel tests can be overly expensive or too difficult for day-to-day operations. For many development teams, parallel testing can only get you so far. That’s where machine learning can help your test times as a complimentary approach.
With Launchable’s machine learning, you can identify and run subsets of tests based on your previous test data. Predictive Test Selection’s machine learning model learns from your code changes over time, and on each change, ranks tests by importance to code changes. This ranking allows you to create a unique subset in real-time.
See How It Works: Predictive Test Selection
Through machine learning, you can run a fraction of your test suite, greatly speeding up your test cycle times, while maintaining high confidence that if a failure exists it will be found.