Back to Blog
Testing guide

What Is a Flaky Test? Causes, Detection & Prevention Guide

Flaky tests fail randomly and erode trust in your CI pipeline. Learn what a flaky test is, its root causes, and how to detect and prevent them.

Armish Shah
July 10, 2026
July 10, 2026
What Is a Flaky Test? Causes, Detection & Prevention Guide

Testing guide

What Is a Flaky Test? Causes, Detection & Prevention Guide

by:

Armish Shah

July 10, 2026

8

min

Share:

On this page

Ready to take your testing to
the next level?

Sleek and intuitive workflows
Transparent pricing
Easy migration

Introduction

A test fails. You rerun it. It passes. Nothing changed. If that sounds familiar, you have flaky tests. They are one of the most expensive problems in software delivery, not because any single failure costs much, but because they slowly train your team to ignore red builds. Once developers start hitting "rerun" instead of investigating, your test suite stops doing its job.

This guide covers what makes tests flaky, the six root causes behind most flakiness, how to detect flaky tests systematically, and how to stop them from entering your pipeline in the first place.

What Is a Flaky Test

A flaky test is a test that produces different results on different runs without any change to the code under test. Same commit, same test, different outcome.

The impact goes beyond wasted rerun time. Flaky tests create three compounding problems:

  1. Lost trust: When failures might be noise, developers stop treating them as signals. Real bugs slip through because someone assumed the failure was "just that flaky test again."
  2. Slower delivery: Reruns, investigations, and blocked merges add friction to every deployment. A pipeline that needs two or three attempts to go green doubles or triples your feedback loop.
  3. Hidden debt: Flakiness usually points to a real weakness, either in the test or in the product. Ignoring it means the underlying race condition or leaky resource stays in your codebase.

What Makes a Test "Flaky"?

The defining trait is non-determinism. A healthy test is a pure function of the code it tests; given the same inputs, it always returns the same verdict. A flaky test has hidden inputs, things like system time, network latency, execution order, or leftover state from a previous test. When those hidden inputs shift, the result flips.

This is why flaky tests are so hard to reproduce locally. Your laptop and your CI runner differ in CPU contention, network conditions, parallelism, and timing. The hidden input that flips the test on CI may never occur on your machine.

The problem exists at every scale. Google has published research showing that a meaningful share of its test suite exhibits some level of flakiness, and that flaky failures account for a large portion of test-to-fail transitions in its CI systems. Microsoft, Mozilla, and GitHub have all written publicly about dedicated tooling and teams built specifically to manage flakiness. If companies with that much engineering investment still fight this problem, no team should expect to avoid it entirely. The goal is management, not perfection.

The 6 Root Causes of Flaky Tests

Almost every flaky test traces back to one of six categories. Knowing them speeds up diagnosis considerably because you can check the likely suspects in order rather than guessing.

1. Timing and Async Issues

This is the most common category, especially in UI and integration tests.

Race conditions: The test asserts on a result before the operation producing it has finished. Under normal load, the operation wins the race. Under CI load, the assertion wins, and the test fails.

Fixed waits: sleep(3000) is a guess about how long something takes. When the environment is slow, three seconds is not enough, and the test fails. When it is fast, you burn three seconds for nothing. Fixed waits make tests both flaky and slow, which is an impressive combination.

Async/await problems: A missing await causes the test to continue before a promise resolves. Sometimes the promise resolves fast enough anyway, and the test passes. Sometimes it does not. These bugs are easy to write and hard to spot in review because the code looks almost correct.

The fix in all three cases is the same principle: wait for events, not for time. Wait for the element to be visible, the request to complete, the state to change.

2. Shared State and Test Dependencies

Test order dependency: Test B passes when it runs after test A because A leaves behind data B silently relies on. Run B alone, or run the suite in parallel, and B fails. Any test that cannot pass in isolation is a flake waiting for a scheduling change.

Shared resources: Two tests writing to the same file, port, or global variable will collide eventually, especially once you enable parallel execution.

Database state conflicts: Tests that assume specific row counts, IDs, or empty tables break as soon as another test, or a previous failed run, leaves the database in an unexpected state. Auto-incrementing IDs are a classic trap here.

3. Environment Inconsistencies

CI vs local differences: Different OS, browser version, locale, screen resolution, or installed fonts can all change behavior. "Works on my machine" is often literally true and completely unhelpful.

Resource starvation: CI runners are usually shared and often underpowered compared to developer machines. A test tuned against a fast laptop can time out on a busy runner.

Container limitations: Memory limits, missing system dependencies, and headless browser quirks inside containers all produce failures that never appear locally.

4. External Dependencies

Any test that calls a real third-party API inherits that API's reliability. Rate limits, maintenance windows, network timeouts, and DNS hiccups all become your test failures. The test is technically doing its job, reporting that something failed, but it is reporting on infrastructure you do not control and cannot fix.

The general rule: unit and integration tests should mock external services. Keep a small, separate set of contract or smoke tests that hit real dependencies, and do not let those block merges.

5. Resource Leaks

Leaks are sneaky because the leaking test usually passes. The victim is a later test that fails when memory runs out, the connection pool is exhausted, or the OS runs out of file handles. The failure appears in a test that has nothing wrong with it, which sends the investigation in the wrong direction.

Symptoms to watch for: failures that only occur in long test runs, failures that move around between runs, and suites that get slower the longer they run.

6. Non-Deterministic Elements

Random values: Unseeded random data means every run tests something slightly different. Occasionally the random input hits an edge case, or violates a validation rule, and the test fails. Seed your randomness so failures are reproducible.

Time zone issues: A test that passes in UTC and fails in the runner's local time zone, or vice versa, is comparing dates without controlling the zone.

Date-sensitive logic: Tests that break at midnight, on the 31st, at month boundaries, or on February 29 are all real and all common. Freeze the clock in tests instead of using the actual current time.

How to Detect Flaky Tests: A 4-Pillar Framework

You cannot fix what you have not identified, and gut feeling is a poor identification method. Teams consistently underestimate how many flaky tests they have because each individual developer only sees a slice of the failures. Systematic detection rests on four pillars.

1. Automated Detection Methods

Historical pass/fail rate analysis: Track every test's result across every run. A test that fails 3% of the time on unchanged code is flaky by definition. This is the cheapest signal you can collect because the data already exists in your CI logs.

Rerun-based detection: If a test fails and then passes on immediate rerun with no code change, flag it. This catches flakes at the moment they occur rather than in retrospective analysis. The caveat: reruns hide flakiness if you only record the final result. Record every attempt.

Statistical flip-rate analysis: Count how often a test transitions between pass and fail across consecutive runs of the same commit or branch. Genuine regressions fail consistently after a specific change. Flaky tests flip back and forth without correlation to code changes.

Setting practical thresholds: A useful starting point is the 2% rule: any test that fails more than 2% of runs on stable code gets flagged for investigation. Tighten the threshold as your suite improves. Whatever number you pick, the point is having an explicit, agreed threshold instead of arguing about each test individually.

2. CI/CD Integration for Detection

Detection works best when it is built into the pipeline rather than run as a periodic audit.

Track per-test metrics, not just per-build results. A build that passes 99% of the time can still contain a test that flakes constantly, hidden behind retries.

Cross-run analysis compares results for the same test across branches, commits, and runners. A test failing on one runner type but not another points at environment, not code.

Environment correlation means recording metadata with every result: runner ID, parallelism level, time of day, browser version. Flakiness that clusters around a specific variable hands you the diagnosis.

Failure pattern recognition groups failures by error message and stack trace. Fifty failures with the same timeout signature are one problem, not fifty.

3. Manual Identification Techniques

Automation catches most flakes, but people catch them earlier.

Developer reports: Make it trivial to flag a test as suspicious, ideally one click or one command. The developer who just hit a weird failure has context that no dashboard has. If reporting takes more than thirty seconds, it will not happen.

Code review red flags: Reviewers should treat these as flakiness smells: hard-coded sleeps, assertions on timing, dependence on test execution order, real network calls, unseeded randomness, and use of the current date or time.

Audit-based reviews: Once or twice a year, review your slowest and oldest tests. Flakiness concentrates in tests nobody has touched in years, written against assumptions that no longer hold.

Prioritization: Not all flakes deserve equal attention. Investigate first the tests that block merges, flake most often, and cover critical paths. A flaky test in a nightly optional suite can wait.

4. Monitoring and Observability

Detection tells you a test is flaky. Monitoring tells you whether the problem is growing.

Dashboards and trend tracking: A visible flakiness rate, suite-wide and per-team, keeps the problem honest. Trends matter more than snapshots. A suite going from 1% to 3% flaky over a quarter is a fire alarm even though both numbers look small.

Alerting thresholds: Alert when the suite-wide flake rate crosses your agreed limit, or when a previously stable test starts flipping. Route the alert to the team that owns the test, not to a channel everyone mutes.

Correlating spikes with changes: A sudden flakiness spike after a dependency upgrade, CI runner change, or parallelism increase usually is not a coincidence. Keeping deployment and infrastructure events on the same timeline as test results makes these correlations obvious.

Test metadata over time: Ownership, framework, last-modified date, and average duration all help surface patterns. If 70% of your flakes live in one legacy Selenium package, you have a migration argument, not just a bug list.

Proven Strategies to Fix Flaky Tests

Detection techniques let you know how many flaky tests you have. This section is about working through them.

1. The Quarantine Approach

Quarantine means moving a known-flaky test out of the blocking pipeline while keeping it running and tracked. It is the single highest-leverage practice for teams drowning in flakes, because it immediately restores trust in the main suite.

The rules that make quarantine work instead of becoming a graveyard:

  • Quarantined tests still run on every build. You keep collecting data; they just cannot block a merge.
  • Every quarantined test gets an owner and a deadline. Two weeks is a common limit. Miss the deadline and the test is either fixed, rewritten, or deleted with a documented decision.
  • Cap the quarantine size. If the queue exceeds the cap, fixing flakes takes priority over new feature work until it is back under the limit.

2. Framework-Specific Solutions

Playwright: Rely on its auto-waiting and web-first assertions like toBeVisible() instead of manual waits. Use test.describe.configure({ mode: 'serial' }) only when order genuinely matters, and prefer isolated browser contexts per test. Turn on trace collection for retries so every flake comes with a full recording.

Cypress: Let its built-in retry-ability do the waiting. The most common Cypress flake source is cy.wait(ms) with a fixed number; replace it with intercepts and cy.wait('@alias') on actual network requests. Avoid conditional testing based on DOM state, which is almost always a race condition in disguise.

Selenium: Most Selenium flakiness comes from raw Thread.sleep calls and stale element references. Use explicit waits (WebDriverWait with expected conditions) everywhere, relocate elements after page changes, and pin browser and driver versions in CI so upgrades happen deliberately.

Jest and pytest: Enforce isolation: reset modules and mocks between tests, use fresh fixtures instead of module-level state, and seed randomness. Both ecosystems have plugins to detect order dependence by shuffling execution (pytest-randomly, Jest's --randomize). Run them regularly, not just once.

3. Root Cause Resolution Techniques

When a flake needs an actual fix, a repeatable workflow beats improvisation.

Reproduce first:  Run the test in a loop, locally or in CI, until it fails. A hundred runs is a reasonable start. If it will not fail in isolation, run it alongside its full suite, in parallel, on a constrained machine. Matching CI conditions matters more than run count.

Collect artifacts on every failure:  Screenshots, videos, browser console output, network logs, and application logs, captured automatically at failure time. Flakes are too rare to debug live; the artifacts are usually all you get.

Investigate systematically: Walk the six root causes in order of likelihood: timing first, then shared state, then environment. Compare metadata from failing runs against passing ones and look for the variable that differs.

Apply known fix patterns: Most fixes fall into a handful of shapes: replace a fixed wait with an event wait, isolate state with fresh fixtures, mock an external call, seed a random value, or freeze the clock. Document which pattern fixed which test. Your next flake probably matches a previous one.

Flaky Test Prevention Methods

Fixing flakes is necessary. Preventing them is cheaper. Here’s how to prevent flaky tests from reaching CI. 

1. Code Review Checklists

A short, enforced checklist catches most flaky patterns before merge. Here are the essentials:

  • No fixed sleeps. Waits must target a condition or event.
  • Every test passes in isolation and in random order.
  • No real network calls to services you do not control.
  • Randomness is seeded; time is frozen or injected.
  • No assertions on incidental details like element counts that depend on unrelated data.

Write the checklist down and link it in your PR template. Team agreements only work when they are visible, and "we all know not to do that" is not a policy.

One newer item deserves explicit mention: AI-generated test validation. Code assistants produce tests quickly, and they reproduce every anti-pattern in their training data, fixed waits included. AI-generated tests should get the same review scrutiny as human-written ones, plus a stability check: run them 20 to 50 times before merging, not once.

2. CI Configuration Best Practices

Resource allocation: Underpowered runners manufacture timing flakes. If your flake rate drops when you double runner resources, the tests were never the whole problem.

Test sharding: Split the suite across parallel runners, but shard by consistent grouping rather than randomly per run, so failures are comparable across builds. Sharding also exposes hidden order dependencies early, which is painful once and valuable forever.

Retry policies: Automatic retries are acceptable only if every attempt is recorded and flagged. A retry that silently converts a failure into a pass is how flakiness becomes invisible. Retry once, log it, and feed the data into your detection pipeline.

Smoke tests: Run a small, fast, ultra-stable subset first. If the smoke suite fails, skip the rest. This protects the full suite's signal and gives developers feedback in minutes instead of an hour.

3. Writing Resilient Tests

Design for diagnosability: A test that fails with "expected true, got false" wastes an investigation. Write detailed tests with messages, log context, and capture artifacts, so a failure explains itself.

Isolate properly: Each test creates what it needs and cleans up what it made. Unique identifiers per run, fresh database transactions rolled back after each test, and no reliance on anything another test created.

Wait on events: Worth repeating because it fixes the largest category of flakes: wait for the condition you actually care about, with a generous timeout, rather than guessing a duration.

Mock deliberately: Mock external services at the boundary, keep the mocks in sync with real contracts, and maintain a small separate suite that verifies the real integrations without blocking merges.

How TestFiesta Helps With Flaky Test Management

Every detection method, fix strategy, and prevention method we discussed in this guide can be built by hand with CI logs, scripts, and discipline. TestFiesta packages it into one workflow, so your team spends time fixing tests instead of building detection infrastructure.

TestFiesta tracks per-test results across every run, flags tests whose failure patterns match flakiness rather than regression, and correlates failures with environment metadata to point you toward the root cause. Quarantine workflows come with the ownership and deadline mechanics built in, so flagged tests do not disappear into a backlog. It works across Playwright, Cypress, Selenium, Jest, and pytest, and plugs into your existing CI pipeline.

Ready to see your suite's actual flake rate?

Start a free TestFiesta trial and get visibility into your test reliability from your very first pipeline run.

Sign Up for a Free Trial

Frequently Asked Questions

What's the difference between a flaky test and an intermittent bug?

A flaky test fails inconsistently because of a problem in the test or its environment; the product is fine. An intermittent bug is a real product defect that only surfaces under certain conditions, like a race condition in production code. The distinction matters because the fix lives in different places, and the diagnosis is the same in both cases: reproduce the failure and find the hidden variable. Never assume a flapping test is "just flaky" until you have confirmed the product is not the cause. 

How many flaky tests is too many for a test suite?

As a working threshold, keep your suite-wide flake rate under 1% of test runs, and flag any individual test failing more than 2% of runs on stable code. More important than the exact number is the trend. A suite at 0.5% and climbing is in worse shape than one at 1% and falling. If more than roughly 5% of your builds need a rerun to go green, flakiness is actively slowing your delivery and deserves dedicated time.

Should I delete or fix flaky tests?

You should neither delete nor try to fix your flaky test as the first step. Instead, quarantine first. Remove the test from the blocking pipeline, keep running it, and set a deadline. Once you’re at the deadline, decide what you want to do based on value. If the test covers a critical path, fix it. If it duplicates coverage that exists elsewhere, or tests behavior nobody can explain, delete it and document why. Deleting a low-value flaky test is a legitimate engineering decision. Letting it rot in quarantine forever is not.

Can AI really help identify flaky test root causes?

Yes, AI can help with identification of flaky test root causes, but within limits. Pattern recognition across large volumes of test results is exactly what machine learning is good at: clustering failures by stack trace, spotting correlations between failures and environment variables, and matching a new flake against previously diagnosed ones. What AI cannot do is understand your system's intent, so treat its output as a strong hypothesis that a developer confirms, not a verdict.

Tool

Pricing

TestFiesta

Free user accounts available; $10 per active user per month for teams

TestRail

Professional: $40 per seat per month

Enterprise: $76 per seat per month (billed annually)

Xray

Free trial; Standard: $10 per month for the first 10 users (price increases after 10 users)

Advanced: $12 per month for the first 10 users (price increases after 10 users)

Zephyr

Free trial; Standard: ~$10 per month for first 10 users (price increases after 10 users)

Advanced: ~$15 per month for the first 10 users (price increases after 10 users)

qTest

14‑day free trial; pricing requires demo & quote (no transparent pricing)

Qase

Free: $0/user/month (up to 3 users)

Startup: $24/user/month

Business: $30/user/month

Enterprise: custom pricing

TestMo

Team: $99/month for 10 users

Business: $329/month for 25 users

Enterprise: $549/month for 25 users

BrowserStack Test Management

Free plan available

Team: $149/month for 5 users

Team Pro: $249/month for 5 users

Team Ultimate: Contact sales

TestFLO

Annual subscription (specific amounts per user band), e.g., Up to 50 users: $1,186/yr; Up to 100 users: $2,767/yr; etc.

QA Touch

Free: $0 (very limited)

Startup: $5/user/month

Professional: $7/user/month

TestMonitor

Starter: $13/user/month

Professional: $20/user/month

Custom: custom pricing

Azure Test Plans

Pricing tied to Azure DevOps services (no specific rate given)

QMetry

14‑day free trial; custom quote pricing

PractiTest

Team: $54/user/month (minimum 5 users)

Corporate: custom pricing

Black Box Testing

White Box Testing

Coding Knowledge

No code knowledge needed

Requires understanding of code and internal structure

Focus

QA testers, end users, domain experts

Developers, technical testers

Performed By

High-level and strategic, outlining approach and objectives.

Detailed and specific, providing step-by-step instructions for execution.

Coverage

Functional coverage based on requirements

Code coverage

Defects type found

Functional issues, usability problems, interface defects

Logic errors, code inefficiencies, security vulnerabilities

Limitations

Cannot test internal logic or code paths

Time-consuming, requires technical expertise

Aspect

Test Plan

Test Case

Purpose

Defines the overall testing strategy, scope, and approach for a project or release.

Validates that a specific feature or functionality works as expected.

Scope

Covers the entire testing effort, including what will be tested, resources, timelines, and risks.

Focuses on a single scenario or functionality in the broader scope.

Level of Detail

High-level and strategic, outlining approach and objectives.

Detailed and specific, providing step-by-step instructions for execution.

Audience

Project managers, stakeholders, QA leads, and development teams.

QA testers and engineers.

When It's Created

Early in the project, before testing begins.

After the test plan is defined and the requirements are clear.

Content

Scope, objectives, strategy, resources, schedule, environment details, and risk management.

Test case ID, title, preconditions, test steps, expected results, and test data.

Frequency of Updates

Updated periodically as project scope or strategy changes.

Updated frequently as features change or bugs are fixed.

Outcome

Provides direction and clarifies what to test and how to approach it.

Produces pass or fail results that indicate whether specific functionality works correctly.

Tool

Key Highlights

Automation Support

Team Size

Pricing

Ideal For

TestFiesta

Flexible workflows, tags, custom fields, and AI copilot

Yes (integrations + API)

Small → Large

Free solo; $10/active user/mo

Flexible QA teams, budget‑friendly

TestRail

Structured test plans, strong analytics

Yes (wide integrations)

Mid → Large

~$40–$74/user/mo)

Medium/large QA teams

Xray

Jira‑native, manual/
automated/
BDD

Yes (CI/CD + Jira)

Small → Large

Starts ~$10/mo for 10 Jira users

Jira‑centric QA teams

Zephyr

Jira test execution & tracking

Yes

Small → Large

~$10/user/mo (Squad)

Agile Jira teams

qTest

Enterprise analytics, traceability

Yes (40+ integrations)

Mid → Large

Custom pricing

Large/distributed QA

Qase

Clean UI, automation integrations

Yes

Small → Mid

Free up to 3 users; ~$24/user/mo

Small–mid QA teams

TestMo

Unified manual + automated tests

Yes

Small → Mid

~$99/mo for 10 users

Agile cross‑functional QA

BrowserStack Test Management

AI test generation + reporting

Yes

Small → Enterprise

Free tier; starts ~$149/mo/5 users

Teams with automation + real device testing

TestFLO

Jira add‑on test planning

Yes (via Jira)

Mid → Large

Annual subscription starts at $1,100

Jira & enterprise teams

QA Touch

Built‑in bug tracking

Yes

Small → Mid

~$5–$7/user/mo

Budget-conscious teams

TestMonitor

Simple test/run management

Yes

Small → Mid

~$13–$20/user/mo

Basic QA teams

Azure Test Plans

Manual & exploratory testing

Yes (Azure DevOps)

Mid → Large

Depends on the Azure DevOps plan

Microsoft ecosystem teams

QMetry

Advanced traceability & compliance

Yes

Mid → Large

Not transparent (quote)

Large regulated QA

PractiTest

End‑to‑end traceability + dashboards

Yes

Mid → Large

~$54+/user/mo

Visibility & control focused QA

Related Articles

Introduction

Manual testing and automated testing are the two ways a QA team verifies that software works. In manual testing, a person runs the application and checks the results. In automated QA testing, scripts do the running, and a tester reads the results. 

This guide covers what manual and automated testing are designed for, where each one fits and fails, and how to decide the ideal testing approach split for your own team based on what you’re building.

What Is Manual Testing

Manual testing is a type of software testing where a human runs the software the way a user would, without automated scripts executing the steps for them. The tester opens the app, follows a test case or their own line of thinking, watches what happens, and records what they find. That’s a simple way to describe it. 

Following a written test case step by step is the least interesting part of the job. What separates a good manual tester from someone clicking buttons is judgment and the ability to notice small details, such as a form accepting information that it shouldn’t, a loading spinner hanging a beat too long, or a vague error message that’s not any help to the users. None of these issues could formally be a part of any test case, but a manual tester would still catch them, as opposed to an automated script that would pass them.

Since manual testing involves human judgment, it’s slow. But in the long run, it uncovers issues during testing that could otherwise appear in production, which is its primary benefit.

Where Manual Testing Works

A good tester recognizes that automation cannot do everything. Manual testing is the right call for a lot of scenarios, including:

  • Exploratory testing: In exploratory testing, a tester works without a script or a written test case. They manually form and test hypotheses about where the software breaks. This is where the bugs nobody wrote a test case for get found.
  • Usability and UX evaluation: A script can confirm a button exists and is clickable, but it can’t tell you if the button is in the wrong place, the label is confusing, or the flow takes two steps more than it should. That’s where testers utilize usability testing and UX evaluation.
  • Accessibility testing: Automated scanners are useful, but they catch a fraction of the problems. In many cases, automated accessibility testing tools only find half the issues that a manual tester can find simply by navigating through the screens.
  • Early-stage features: When the UI is being redesigned every few days, automation written previously would be broken after the changes. Manual testing absorbs the change without maintenance cost.
  • One-off tests: Automation works well when you’re doing it at scale. For one-off tests like data migrations, configuration changes, and a release-specific check, manual testing is more efficient. 

What Is Automated Testing

Automated testing uses scripts and tools to execute test cases programmatically. Someone writes the test once, and from then on, it runs automatically, on demand or on a schedule, as many times as needed, at whatever hour the pipeline triggers.

The standard way to think about the layers is the testing pyramid. At the base of the pyramid are unit tests, which are fast and isolated and check individual functions. Above the base are integration tests, which verify that components work together. At the top are end-to-end tests that drive the full application through the UI. The pyramid shape is the point. You want many cheap and quick tests at the bottom and few expensive, slow, and fragile ones at the top.

Automation exists to take repetitive verification off people’s plates so they can do more strategic work. A team with a focus on automation doesn’t need fewer testers. It needs its testers to do exploratory and usability testing instead of re-running last quarter’s regression suite by hand.

Where Automated Testing Works

Automation pays off when the same check needs to run many times, or when the check is physically impossible for a human to perform, such as:

  • Regression testing: Regression testing verifies that the new code didn’t break existing functionality. This is the single highest-return automation target because the suite runs on every change and the cost of writing it is amortized across hundreds of executions.
  • Smoke tests: Smoke tests are a small set of checks on critical paths (login, checkout, the core workflow) that run after every deployment. They take minutes and catch the failures that would otherwise reach users first.
  • API testing: APIs change less often than UIs and don’t have layouts to break. API testing is fast, stable, and cheap to maintain, and API tests catch broken changes before a frontend ever hits them.
  • Performance and load testing: Making sure that your software works as well on 5000 users as it does on 500 is not something you can do manually. That’s why performance testing exists, and it’s done through automation.
  • Cross-browser and cross-device testing: Cross-browser and cross-device testing runs the same test suite across browsers, such as Chrome, Firefox, and Safari, and a range of screen sizes, such as desktop, mobile, and tablet, in parallel. Doing this manually means multiplying every test case by every test environment, which is why these tests are automated.
  • Data-driven tests: Data-driven tests are executed on specific data, such as a form with 50 valid and invalid input combinations, which is tedious to test by hand and trivially parameterized in code.

The Difference Between Manual and Automated Testing

Choosing between manual and automated testing is not a one-off decision. And QA teams should stop thinking in terms of which approach is better. The right question to ask is which approach is the right one for your product. 

Manual vs Automated Testing

Here’s a table that will make things easier to understand:

Manual testing Automated testing
Best at Finding unknown problems Confirming known behavior still works
Speed per run Slow Fast once written
Upfront cost Low High (tooling, scripting, setup)
Ongoing cost Scales with every run Maintenance when the app changes
Repeatability Varies by tester and day Identical every time
Handles UI change Adapts immediately Breaks, needs updating
Catches Usability, accessibility, edge cases nobody scripted Regressions, performance, high-volume data cases
Misses Anything too repetitive or high-volume to do thoroughly Anything requiring judgment about whether the result is good, not just correct

Most mature teams utilize both manual and automated testing, with around 70 percent of test execution automated and 30 percent manual. That said, there’s no hard-and-fast rule about the ideal split. A backend-heavy platform with stable APIs can push well past 70 percent, and a consumer app in active redesign should sit closer to 50 percent. The split matters less than what goes on each side: repetition to the machines, judgment to the people.

Manual vs Automated Testing: Pros and Cons

Here are some pros and cons of manual and automated testing.

Manual Testing

Manual testing’s pros include:

  • No setup, tooling, or scripting cost to get started
  • Finds bugs that weren’t anticipated
  • The only option for usability, accessibility, and exploratory work
  • Adapts to UI changes instantly
  • Testers build product knowledge that feeds back into design and requirements

Manual testing’s common cons are:

  • Slow, and cost grows linearly with every run
  • Results vary by tester and their attention to detail
  • Can’t cover load, performance, or large data sets
  • Regression cycles get longer as the product grows
  • Prone to human error

Automated Testing

Automated testing pros are:

  • Runs in minutes, at any hour, on every commit
  • Identical execution every time
  • Handles volume no human can: thousands of users, hundreds of inputs, dozens of browsers
  • Cost per run approaches zero over time
  • Frees testers for higher-value work

Automated testing’s common cons include:

  • Significant upfront investment in tools, infrastructure, and skills
  • Maintenance burden every time the application changes
  • Flaky tests erode trust in the whole suite
  • Only checks what it was told to check; a passing suite proves nothing about what wasn't scripted
  • Poorly chosen automation (usually too much at the UI layer) costs more than it saves

TestFiesta Gives Your QA Team a Home for Both

The gap on most teams isn’t a shortage of testers or a shortage of scripts. It’s that the results of both manual and automated testing don’t often live in the same place. Automated runs report into CI dashboards, whereas manual test cases live in a spreadsheet, a wiki, or a tool the automation engineers never open. 

When a release manager is about shipping, someone has to go collect answers from three different places and stitch them together, and the stitching is where things get missed.

TestFiesta puts manual and automated testing under one roof. Manual test cases, exploratory sessions, and automated results feed into the same test runs, so coverage is visible in one view instead of being inferred from several. 

In TestFiesta, you can see which requirements are covered by automation, which are covered manually, and which aren’t covered at all. When a regression suite passes but a tester flags a usability problem in the same feature, both show up together against the same release.

Bring your manual and automated testing under TestFiesta, centralize your test cases, and release with total confidence.

Start your free trial today

FAQs

Will automated testing eventually replace manual testing entirely?

No, automation replaces repetition, not judgment. A script only checks what it was told to check, so usability, accessibility, and exploratory work still need a person and human judgment. 

What’s the best tool to start with for automated testing?

The best tools for automated testing depend on your needs. For web UI, Playwright is the strongest current option. For mobile testing, use Appium. Begin with five to ten smoke tests on your most critical paths, get them running in CI, and expand from there.

How much of our QA budget should go toward automation?

To decide the budget to go toward automation, look carefully at your regression suites because that’s the first thing you need to automate. From then on, look at other forms of testing that can be automated, such as smoke testing, API testing, and cross-browser and cross-device testing. Building and scaling these test suites often takes more time and cost than it would take to automate them. A good rule of thumb is to start with a 70 percent automation and 30 percent manual split, and then change the split based on your needs.

Testing guide

Introduction

Performance testing is one of the most important types of software testing that determines whether your software stays fast, stable, and reliable when real traffic comes in. 

This guide will explain performance testing in detail and break down the six types of performance testing, along with metrics that actually matter and the tools built for each type, including AI-specific options. 

You’ll also find playbooks for API load testing, LLM performance testing, and building performance gates into your CI/CD pipeline, so you can catch regressions before your users do.

What Is Performance Testing in Software

Performance testing is the practice of measuring how a software system behaves under demand: how fast it responds, how stable it stays, and how well it scales as load increases.

Where functional testing asks “does it work?”, performance testing asks “does it stay fast and reliable when real users arrive?” 

In simple words, a checkout flow that passes every functional test can still collapse on Black Friday due to traffic. And performance testing exists to find that out before your customers do.

The 6 Types of Performance Testing

Performance testing is an umbrella term that includes several types of testing, including load testing, stress testing, spike testing, and soak testing. Each applies a different traffic pattern to the same system to answer a different question: can it handle expected traffic, where does it break, can it absorb a surge, and does it degrade over time? Understanding which question you are asking determines which test you run.

Load Testing

Load testing simulates the number of concurrent users the system is expected to handle at normal peak traffic. You ramp to target concurrency, hold it there, and measure response times, error rates, and resource utilization while the system works.

This answers the most fundamental performance question: can the system handle the traffic it was built for? Run it before every major release and after any significant architectural change. The output is a baseline, a known-good performance profile that every subsequent test gets measured against. Without that baseline, you cannot tell a regression from normal variance.

Stress Testing

Stress testing pushes the system past its known limits. You keep increasing the load until something fails, deliberately. It answers the question load testing does not: what happens when traffic exceeds capacity?

The failure mode matters as much as the failure point. Does the system fail gracefully, queuing requests and returning 503s with retry headers? Or does it fail catastrophically, crashing, corrupting data, or hanging indefinitely? A system that degrades gracefully under overload is operationally manageable. One that crashes silently is not, and you want to learn which one you have in a test environment rather than an incident channel.

Spike Testing

Spike testing applies a sudden, sharp increase in load, an instantaneous jump to high concurrency. It simulates the traffic events that actually take systems down: a product launch, a viral social post, a flash sale, or a breaking news story.

The question it answers is whether the software can absorb the transition from normal to extreme without dropping requests or corrupting state. Autoscaling that takes three minutes to respond is useless against a spike that arrives in three seconds.

Soak Testing

Soak testing, also called endurance testing, runs a moderate load for an extended period, usually in hours. It surfaces the failure modes that never appear in short tests, such as memory leaks that accumulate slowly, connection pool exhaustion, log files that fill disks, database index fragmentation, and cache eviction patterns that degrade hit rates over time.

A system that passes a 10-minute load test and fails after 6 hours of normal traffic has a soak problem, and no amount of short testing will find it. Run soak tests on a weekly schedule in a staging environment to stay on top of your product’s durability.

Scalability Testing

Scalability testing increases load in controlled steps and measures how performance changes at each level. It answers the architectural question: does performance degrade linearly, sublinearly, or does it cliff at a specific threshold?

A system that handles 100 concurrent users at 200ms p95 and 1,000 concurrent users at 210ms p95 scales well. One that handles 100 users at 200ms and 500 users at 4,000ms has a bottleneck that will surface in production at a specific traffic level. Scalability testing tells you exactly where that level is, so capacity planning becomes math instead of guesswork.

Volume Testing

Volume testing stresses the system with large volumes of data rather than large numbers of users. It surfaces a different class of failure entirely, such as database queries that run fine on 10,000 rows and time out on 10 million, report generation that works at 1,000 records and exhausts memory at 100,000, and search indexes that degrade as the corpus grows.

Teams that focus exclusively on concurrent users overlook this one, and it is critical for any application where data volume grows continuously. Your user count might stay flat while your database quietly grows toward a cliff.

Important Performance Testing Metrics 

Performance testing measures the following two fundamentally different aspects of a system:

Server-side metrics: These describe how the backend performed and include: 

  • Response time (p50/p95/p99). Always read response time as percentiles, not averages. An average response time of 200ms that hides a p99 of 8,000ms means 1 in 100 users waits 8 seconds. The p95 is your SLA number; the p99 is your early-warning threshold.
  • Throughput. Throughput is the number of requests per second the system successfully handles. The ceiling where throughput plateaus while latency keeps climbing is your saturation point, and it is worth knowing before production finds it for you.
  • Error rate. Error rate is the percentage of requests returning errors like 5xx responses, timeouts, and connection refusals. Below 0.1% is healthy. Above 1% under load is a hard failure.
  • Resource utilization. Resource utilization measures CPU, memory, database connection pool, and GPU utilization for AI systems. These numbers spike before latency does, which makes them your earliest signal that saturation is approaching.

Experience-side metrics: These describe what the user actually felt:

  • Core Web Vitals. Core Web Vitals include Largest Contentful Paint (LCP), Interaction to Next Paint (INP), and Cumulative Layout Shift (CLS). LCP measures when the main content loads, INP measures how fast the page responds to clicks, and CLS measures how much the layout jumped around. These can only be measured in a real browser, not by protocol-level tools that never execute JavaScript.
  • Time to First Byte (TTFB). TTFB measures how long before the browser receives the first byte of the response. A fast TTFB does not guarantee a fast page. A slow TTFB guarantees a slow one.
  • Total page load time. Total page load time measures the time to load the full experience, including JavaScript execution, image loading, and third-party scripts. This is what users actually experience, and it can be many times the server response time.

API Performance Testing: 4-Step Playbook

API performance testing is where protocol-level tools shine. Stateless requests, deterministic responses, and high concurrency requirements map directly onto what k6, JMeter, and Gatling were built for. Four practices separate useful API load tests from theater:

1. Test each endpoint independently before testing the full flow. A bottleneck at one endpoint stays invisible inside an end-to-end flow test until it is consistent enough to surface at p95. Isolate first, integrate second.

2. Use realistic request distributions. A load test that sends the same request 10,000 times is not representative of anything. Production traffic has a distribution of payload sizes, query complexities, and authenticated versus unauthenticated requests. Sample from production logs to build scenarios that resemble reality.

3. Test error handling under load. Most teams test the happy path under load and assume error handling works. Deliberately inject failures at load: timeouts, malformed payloads, auth failures. Then verify that the error responses are correct, the retry logic does not amplify load into a self-inflicted outage, and the circuit breakers trip at the right thresholds.

4. Establish a performance budget per endpoint. Define acceptable p95 response times for each endpoint before testing, not after. A search endpoint at 500ms p95 is a different standard than a health check at 20ms p95. Without per-endpoint budgets, performance testing produces numbers with no pass/fail criteria attached, which is measurement, not testing.

Tips to Do AI Performance Testing

AI performance testing has different failure modes, different testing metrics, and different tooling requirements, and treating an inference endpoint like a REST API will give you clean dashboards over a degrading system.

Here are some tips to note if you’re building on LLMs:

TTFT and ITL Are Your Primary Metrics. Time to First Token (TTFT) is the LLM equivalent of TTFB: how long before the user sees any output at all. Inter-Token Latency (ITL) measures how consistently tokens stream after the first one. A TTFT of 500ms with a steady 50ms ITL feels fast. A TTFT of 200ms with 2-second pauses between tokens feels broken, even if the total response time is similar. ITL degradation is typically the first visible symptom of GPU saturation, appearing before TTFT degrades.

Notice GPU saturation, not CPU saturation. AI inference is GPU-bound. Monitor GPU compute utilization, GPU memory, and KV cache usage throughout load tests. HTTP latency is a lagging indicator here: by the time it spikes, the GPU has been saturated for a while, and the request queue is already growing. GPU metrics are the leading indicators, and standard load tools do not collect them.

Quality and speed degrade under load. For traditional APIs, correctness is binary. The response matches the expected output, or it does not. For LLM systems, output quality can degrade under high concurrency, and latency metrics will never show it. The fix is to mix canary prompts with known-good reference outputs into load test traffic and score the responses. A quality drop that only appears at high concurrency is a real capacity limit, and it is invisible to every latency chart you have.

Cost is a performance dimension. A traditional API can scale horizontally at roughly linear cost. GPU capacity scales in discrete, expensive jumps, and underutilized GPU instances represent significant wasted spend. Load test results for AI systems need to inform capacity provisioning and cost-per-request modeling, not just SLA commitments. A configuration that meets latency targets at twice the necessary cost has failed a performance test, just a different one.

TestFiesta Brings Performance Test Results Into the Same Place as Everything Else

Performance testing generates some of the most actionable quality signals in software development, such as a p95 regression, a throughput ceiling, a soak failure, and quality degradation under load. Those signals live in different places, like a k6 dashboard, a CI log, a load test report, a Grafana board, or a spreadsheet someone updates before releases. 

None of it connects to the test cases your QA team maintains, the release decisions your leads make, or the coverage picture anyone tracks.

TestFiesta closes that gap. It gives you structured test case organization across functional and performance testing, pass/fail tracking against the performance budgets your CI enforces, and release readiness visibility that offers quick, actionable, and objective insights with one view of a customizable dashboard. Performance results become part of the same quality record as everything else, because that is where release decisions actually get made.

Performance metrics, CI logs, and QA test cases shouldn’t live in isolation.

TestFiesta bridges the gap by centralizing your functional and performance testing into one source of truth.

Start your free trial on TestFiesta today

FAQs

What’s the difference between performance testing and load testing?

Load testing is one specific type of performance testing. It simulates expected peak concurrent users to verify the system holds up under normal demand. Performance testing is the umbrella discipline that includes load, stress, spike, soak, scalability, and volume testing, each applying a different traffic pattern to answer a different question. 

When should performance testing start in the development lifecycle?

Performance testing should start as early as the component level, not as a pre-release activity. Testing individual APIs, database queries, and service endpoints catches bottlenecks when they are cheapest to fix, before they are embedded in an integrated system. 

What tools should I use for performance testing?

The tools you should use for performance testing depend on what you’re testing. For API and high-concurrency load testing, k6 is the modern developer-friendly choice, with JavaScript test scripts, CLI execution, and native CI/CD integration. JMeter is the mature enterprise option with the widest protocol support. For web application experience testing, including Core Web Vitals under load, use a real-browser tool such as a Playwright-based load generator or Evaluat. For AI inference benchmarking, NVIDIA’s AIPerf (formerly GenAI-Perf) measures TTFT, ITL, and throughput directly. 

How is AI performance testing different from traditional performance testing?

AI performance testing is different from traditional performance testing in four fundamental aspects. One, in AI performance testing, the primary latency metrics are Time to First Token (TTFT) and Inter-Token Latency (ITL) rather than response time. Two, the resource bottleneck is GPU memory and compute rather than CPU. Three, output quality can degrade under high concurrency, not just speed, which requires quality scoring mixed into load test traffic. Four, cost is a first-class performance dimension because GPU scaling is discrete and expensive.

Testing guide

Introduction

Most types of testing focus on what software does. But white box testing looks at how it does it. By examining the code behind the interface, testers can catch logic errors, security gaps, and untested paths that black box methods miss entirely. This guide covers what white box testing is, how it works, and how to apply it effectively.

What Is White Box Testing?

White box testing is a software testing method where test cases are designed using knowledge of the application’s internal code. Instead of treating the software as a sealed unit and checking only its outputs, the tester works directly with the logic that produces those outputs: the paths execution can take, the branches and conditions that decide between them, and the loops that repeat them.

The goal is to go beyond confirming that correct inputs produce correct results and verify that the logic itself is sound, that every meaningful path through the code gets exercised, and that no hidden route exists that could fail under conditions nobody thought to try from the outside.

The name “white box” comes from a simple contrast: Black box testing sees only the exterior of the software. White box testing, sometimes called glass box testing, sees everything inside.

White Box vs. Black Box vs. Gray Box: What’s the Difference

White box testing, black box testing, and gray box testing all tell you different things about your software.

White box testing gives the tester full visibility into source code, architecture, and internal logic. Test cases are built around code structure, which makes this method effective at finding logic errors, dead code, security vulnerabilities buried in code paths, and branches no test has ever touched. It’s typically performed by developers and software development engineers in test (SDETs), and it lives mostly at the unit and integration levels.

Black box testing works with no knowledge of internals. Test cases come from requirements, specifications, and expected user behavior, which makes this method effective at finding functional failures, usability problems, and gaps between what was built and what was asked for. It’s typically performed by QA engineers and end users at the system and acceptance levels.

Gray box testing combines partial internal knowledge with external behavior testing. The tester knows enough about the architecture, perhaps through system diagrams, API documentation, or database schemas, to design smarter tests without full code access. It bridges the gap between developer-authored unit tests and QA-authored functional tests, and it earns its keep in API testing and integration scenarios involving third-party systems.

Learn more about the difference between black-box testing and white-box testing.

The 6 White Box Coverage Techniques and When to Use Each One

White box testing isn’t a single technique but a family of coverage criteria, each measuring a different dimension of how thoroughly the code has been exercised. 

1. Statement Coverage

Statement coverage states that every executable statement in the code must run at least once. It’s the most basic coverage criterion, the easiest to achieve, and the easiest to game. A test suite with 90% statement coverage can still miss the one branch that throws a NullPointerException in production. If your statement coverage sits below 80%, you have a significant amount of untested code. 

2. Branch Coverage

Branch coverage measures that every possible branch at every decision point must be exercised, meaning both the true and false paths of every if, else, switch, and ternary. Branch coverage is stronger than statement coverage because it forces tests for conditions that statement coverage ignores. A function with an if/else can hit 100% statement coverage with a single test that only takes the if path. Branch coverage requires both. For most production codebases, this is the right default target. It catches the logic errors that matter most without the combinatorial explosion of full path coverage.

3. Condition Coverage

In condition coverage, each individual boolean sub-expression within a complex condition must evaluate as both true and false, independently. Where branch coverage tests the outcome of a decision, condition coverage tests the individual components driving it. It earns its cost in functions with compound conditions, like if (age >= 18 && has_id && is_student), where a bug in one sub-expression can be masked by the behavior of another. It’s not necessary everywhere. Apply it selectively to authentication logic, access control checks, and business rules built on multiple independent conditions.

4. Path Coverage

Every possible execution path through the code, from entry to exit, must be tested. It’s the most thorough criterion and the most expensive, because the number of paths grows exponentially with the number of conditional branches. A function with three independent if statements already has eight possible paths. Full path coverage is impractical for most codebases at scale, so apply it where a missed path carries real consequences: payment processing logic, authentication flows, and safety-critical functions. For everything else, branch coverage is sufficient.

5. Data Flow Testing

Data flow testing tracks variables through their lifecycle, where they’re defined, where they’re used, and whether every define-use pair is exercised by at least one test. It catches a class of bugs that coverage percentages miss entirely, such as variables defined but never used, variables used before initialization, and values transformed incorrectly between assignment and use. It’s particularly valuable for functions with complex state management, data transformation pipelines, and code that passes mutable objects between methods.

6. Mutation Testing

Mutation testing deliberately introduces small changes into the code, such as flipping a > to >=, changing a + to -, or removing a return statement, and then checks whether the test suite catches them. If a mutation survives and the tests still pass, the suite has a gap: it executed the code but never verified the behavior the mutation changed. This makes mutation testing the only technique on this list that measures test quality rather than test quantity. It’s computationally expensive and slow, so run it on critical modules rather than the entire codebase. A mutation score below 70% on a critical module is a meaningful signal that your coverage numbers are hiding gaps.

White Box Testing Lives in the Software Development Lifecycle

Here’s where white box testing usually occurs in the SDLC:

  • During Development (Unit Testing): Developers write white-box tests alongside the code itself, targeting branch and condition coverage on individual functions. This is the highest-leverage moment for the technique: a bug found here costs minutes to fix, while the same bug found in production costs hours to diagnose and days to remediate.
  • During Integration (Component Testing): SDETs and senior developers apply white-box techniques to the data flow between components, how values pass across module boundaries, whether shared state is managed correctly, and whether integration paths exercise the same error handling that isolated units do.
  • During Security Review (White Box Penetration Testing): Security engineers with full code access probe authentication logic, input validation, access control checks, and cryptographic implementations for vulnerabilities that are invisible from the outside. This is how teams find authentication bypass bugs, insecure default conditions, and hardcoded credentials before attackers do.

TestFiesta Turns White Box Coverage Into a Signal Your Whole Team Can Act On

Everything in this guide points to the same conclusion: white box testing produces the most precise quality signal available. Branch coverage percentages, mutation scores, and maps of untested paths — no other testing method tells you exactly where your risk lies.

But precision only matters if the signal reaches the people making release decisions. A coverage report that lives in a developer’s terminal and a test case that lives in a spreadsheet are both invisible to the QA lead whose primary question is “Are we ready to ship?”

That’s the gap TestFiesta closes. As your test management layer, it gives white box efforts a home the whole team can see: structured test case organization instead of scattered spreadsheets, coverage tracked across CI/CD runs instead of buried in build logs, and release readiness visibility that turns a developer’s coverage report into a quality signal stakeholders can actually read.

Stop letting valuable quality signals get buried in developer logs.

See how TestFiesta turns your white box testing into clear, actionable insights.

Start your free trial today

FAQs

Who performs white-box testing, developers or QA engineers?

White box testing is primarily performed by developers and SDETs, since white box testing requires knowledge of the source code and is naturally owned by people who write or deeply understand the implementation. QA engineers typically own black-box and system-level testing.

What’s the difference between code coverage and test coverage?

Code coverage measures how much of the source code executes during testing, which is measured in statement coverage, branch coverage, and path coverage. Test coverage is broader, measuring how well tests validate the system against requirements, including functional, performance, and security requirements. 

Is white-box testing relevant for teams using TDD?

Yes, white box testing is very relevant for teams using test-driven development (TDD). Writing a test before the code means designing it around the intended internal logic, so TDD teams naturally achieve high branch coverage. Tests exist for each logical path before the path is implemented. What white-box testing adds on top of TDD is the measurement layer, confirming that tests written during TDD actually exercise the paths they were meant to cover, and surfacing gaps where the implementation drifted from the original test design.

Testing guide

Ready for a Platform that Works

The Way You Do?

Stop fighting your tools. Start shipping with confidence. TestFiesta adapts to your workflow, not the other way around.

Welcome to the fiesta!