New data from 1,500+ QA pros: The 2025 State of Software Quality Report is live
DOWNLOAD YOUR COPY
All All News Products Insights AI DevOps and CI/CD Community

Stop Test Suite Execution with ‘X’ Failed Tests | Fail-fast Principle

Katalon reduces the execution wait-time by allowing users to stop a test suite execution when a test case fails, or when a flawed code is spotted. Learn more.

Hero Banner
Smart Summary

Katalon Studio 8.1 now empowers testing teams with a critical fail-fast capability, allowing immediate termination of test suite execution upon reaching a predefined failure threshold. This strategic enhancement significantly reduces waiting times, optimizes resource utilization, and lowers infrastructure costs by enabling earlier identification and rectification of code flaws.

  • Implement Fail-Fast for Early Bug Detection: The fail-fast principle halts operations upon detecting flaws, making software bugs easier to identify earlier in the development cycle, strengthening code, and reducing the intrinsic cost of defects.
  • Configure Conditional Test Execution Termination: Leverage Katalon Studio 8.1's -maxFailedTests=T command option to automatically stop test suite executions when a specified number of test cases fail, generating immediate reports for quicker feedback.
  • Analyze Test Trends with TestOps Integration: Connect Katalon Studio to TestOps, the built-in test reporting platform, to centralize and visualize pass/fail patterns of your test runs, gaining deeper insights into test performance and code quality trends.
Good response
Bad response
|
Copied
>
Read more
Blog / Insights /
Stop Test Suite Execution with ‘X’ Failed Tests | Fail-fast Principle

Stop Test Suite Execution with ‘X’ Failed Tests | Fail-fast Principle

Contributors Updated on

The Fail-fast Principle in Software Testing

Fail-fast principle Katalon Studio

In software development, a fail-fast system is a tool that will notify when a failure is likely to occur. The philosophy of the fail-fast principle is formed around the idea that a system should stop normal operations rather than trying to continue working around a flawed piece of code. 

The fail-fast principle makes software bugs easier to detect earlier in the development cycle. It allows for faster strengthening of the code under development, limits the number of bugs that make it into production, and reduces the intrinsic cost of letting bugs in the code.

In short, it is better to fail fast, fail often in the development than later when the product is about to be released.

One of the benefits of test automation is the ability to test early, often, and anywhere in the development cycle. Katalon Studio 8.1 delivers a vital feature that aims to increase the operations and cost-efficiency of your automation cycle. Leveraging the fail-fast principle,  Studio 8.1 provides users with the ability to stop Test Suite Executions when a particular failure threshold is reached. 

This new feature will help make more efficient use of testing devices and improve infrastructure costs, especially for cloud users.

Fail Fast, Fail Often in Katalon Studio – Terminate Execution Conditionally

 

Failure thresholds in KS 8.1 allow users to terminate the Test Case or Test Suite Collection execution when there is a significant number of test cases in an execution that has failed, enabling them to provide feedback earlier in the cycle rather than waiting until the test cycle is completed.

To leverage this feature, we have included a new command option, -maxFailedTests=T,  where T is the maximum number of failed executions allowed before the test is stopped. Once the Test Execution stops, Katalon Studio will generate the report containing all the insights. This feature is only available for tests executed through the CLI or CI using the runtime engine.

First, find the option to set the threshold within the Generate Command for Console Mode dialog box –  set the level of failure tolerance by ticking the box “Terminate the execution once the total number of test failures reaches this threshold” and typing a number in the text field.

Test-Failure-Thresholds

Generate the CLI command, which in this case will include the -maxFailedTests= parameter in it.

Generate-the-CLI-command

Run the execution and once it reaches the threshold, there will be a message in the CLI indicating that it had stopped following the rules. 

Stop-a-test-suite-execution-when-a-test-case-fails

You can also take a look at the summary of passed and failed tests generated by Studio in the Test Cases Table within the reports:

To learn more about how to leverage this feature in your testing environment, check out the Katalon Studio 8.1 release notes.

Access Pass/Fail Trends with TestOps

After selecting your failure threshold, connect to TestOps, Studio’s built-in test reporting and orchestration platform, to examine your pass/fail patterns.

Step 1. Set up an Organization and Project

First, log in to analytics.katalon.com with your Katalon account.

Set up project in TestOps

Step 2. Integrate with TestOps in Katalon Studio

Open Katalon Studio, go to Project > Settings (similar for both Mac and Windows).

  • Click on Katalon TestOps > check the Override authentication box > choose your Organization (if you cannot find your Organization, click Fetch Organization)
     
  • Insert your Katalon email and password

Click on Enable Katalon TestOps Integration > choose your Team > Project > Apply and close.
TestOps setting in Katalon Studio 2
 

Step 3. Push and view Katalon Studio Test Suite Results on TestOps

Note: TestOps will automatically collect all of your test runs by Test Suite. Assemble your Test Cases into a distinct Test Suite to ensure that executions are thoroughly documented. In the left menu, navigate to TestOps > Test Runs > select a Test Run.

List of Studio Results on TestOps

Having been navigated to TestOps, you can view the pass/fail trends. 

Wrapping Up

We are thrilled about Studio 8.1, and we hope you are too. We encourage you to download Studio 8.1 to start taking advantage of its many new features and improvements. 

For a complete list of new features, improvements, and fixes, please visit the release notes. As always, please post any questions, ideas, or concerns on our community site, we are eager to hear from you.

 

Download Katalon Studio button

 
 

Ask ChatGPT
|
Katalon Team
Katalon Team
Contributors
The Katalon Team is composed of a diverse group of dedicated professionals, including subject matter experts with deep domain knowledge, experienced technical writers skilled, and QA specialists who bring a practical, real-world perspective. Together, they contribute to the Katalon Blog, delivering high-quality, insightful articles that empower users to make the most of Katalon’s tools and stay updated on the latest trends in test automation and software quality.
on this page
Click