How to combine Continuous Integration (CI) – Fail Fast Principle?
In an Agile world, the existing software system evolves and new software development continues to scale-up. The changes aim to increase the business value of the software by introducing new functionality, enriching existing functionality, scaling-up performance or fixing bugs.
Software is prone to bugs just as humans are prone to making mistakes. Sadly, no code is ever bug free. There are two ways you can tackle these issues. One way is to react to the system while it is failing, but this just prolongs the problem instead of actually solving it. While it may seem like a good idea to detect system failures just as they are about to happen, this could result in deadlocks, data loss, data corruption, and data inconsistency.
The other way is to use the fail-fast principle. The fail-fast principle encourages the software to fail immediately as soon as an error occurs instead of working around the error. This principle is based on the fact that the earlier we identify critical issues, the easier it will be to fix them thereby reducing cost. But regression is expensive and Test execution frequency delays integration and testing of newer functionality.
Continuous integration (CI) helps in providing quick feedback on the latest implementation. Continuous Integration Test execution results ensure the releases don’t break existing core functionality and the newly developed code works great. Developers often need rapid feedback from their test results, but most of the enterprise regression test suites usually take hours to execute.
Here are a few pointers that could make your life easier:
- Identify tests that impact common shared backend objects and dependency components
- Prioritize the order of test execution, beginning with tests that are more likely to expose defects earlier
- Test coverage catches the majority of the integration issues at the beginning. Hence, testers need to understand all the possible scenarios for the domain
- Schedule regression run on a day-to-day basis to capture issues at the end of the day code check-ins
- Select tests that are likely associated with the latest implementation
- Test and functional requirement correlation helps to determine which tests need to be added and provide efficiency to achieve code-test coverage
Therefore, by combining Continuous Integration and the fail-fast principle of testing we can reduce the number of potential defects reported after delivery.
This results in improved productivity, shorter DEV-QA cycle, reduction of re-work and bug fixing thereby ensuring timely sprint releases. Developers, Testers and other resources can now focus on process optimization and project innovations. Hence, the acceptance of “fail fast, fail often” principle results in accelerated time to market at a reduced cost.