The Fail-fast principle stems from the significant benefit of detecting bugs at a very early stage of the development cycle.
The earlier bugs are detected, the more efficient time and money are spent.
Specifically, a fail-fast system allows you to identify the likelihood of failure quickly. This way, your team can detect bugs quicker before moving into production and minimize the fixing cost in later stages of the SDLC. The execution will stop as soon as something goes wrong, and the error message helps to detect right away.
Katalon Studio offers an essential feature that helps testers and developers test early and often by terminating Test Suite Executions when a particular point of failure threshold is reached. Read on to discover the way to apply the Fail-fast principle in testing with Katalon Studio.
Adopting the Fail-fast Principle
The fail-fast principle may sound unnecessary for small-scale companies.
But let’s imagine your organization has to run a test suite of 10,000 test cases. It would take considerable time to complete all the test cycles and get final feedback.
By setting a failure threshold, the execution will immediately stop once a specific number of tests have failed.
Let’s give a threshold of 200 out of 10,000 test cases. This means that if the 200th failure has occurred, the tests after would be paused. Overall this will enable you to deliver a high-quality product to your customers with confidence by detecting bugs earlier, thus saving time and money.
Applying the Fail-fast Principle with Studio
Video Tutorial
What we need before apply?
- Terminate Execution Conditionally is a feature that can terminate a test execution automatically by setting a maximum number of test failures. As a result, you can detect bugs immediately, minimize the cost of fixing failures in later stages, and enhance release readiness.
- Katalon Runtime Engine
How to apply? Step-by-step instructions
Step 1: First of all, you will notice a new command option, maxFailedTests=<T>, where T is the allowance number of test failures before it stops executing test case/test suite collection.
To set it up, click on the Generate Command for Console Mode icon.
Step 2: Then, tick the box for Terminate the execution once the total number of test failures reaches this threshold and specify the number of failed tests allowed.
Step 3: Later on in the CLI command, you will find a maxFailedTests= parameter. Now, click Copy to Clipboard.
Make sure that you have already installed KRE to create this command.
Step 4: When the threshold is reached, the result in CLI will display with a message saying that it has stopped executing.
From now on, you and your team can detect bugs soon, debug faster, all deploy efficiently by optimizing efforts and resources throughout development stages with this feature – available on Katalon Studio 8.1.
Reference: Fail-Fast in Testing with Katalon.
Visit Katalon’s Blog to check out more articles about Automation Testing
Read more:
Automation Testing Execution and Report