Hero Background

Power Your Software Testing with AI Agents and Cloud

The Native AI-Agentic Cloud Platform to Supercharge Quality Engineering. Test Intelligently and Ship Faster.

Test ManagerTest Management

Duplicate Test Case Detection With AI: Cut Repository Noise Without Losing Coverage

How AI duplicate test case detection works, what each match band should trigger, the KPIs that matter, and the variants a semantic scan must never consolidate.

Published on:

Your test suite grew this quarter. Did your coverage?

If you cannot answer that, you have a duplicate problem. AI made writing a test case nearly free, and a generator writes a new one whether or not the suite already has it. The count goes up, runs get slower, and the coverage report looks better than reality.

Think of duplicate detection as a smoke detector, not a sprinkler. It shows where to look. A person decides what goes.

Finding candidates takes minutes. The hard part is deciding which matches are true copies and which are variants guarding a different risk, like another currency or permission level.

TL;DR

AI duplicate detection finds test cases that check the same behaviour in different words. It ranks them. You decide.

  • Why suites bloat. Writing a test case used to be expensive, and that cost was a filter. AI removed the cost, and the filter went with it.
  • Not every match is a duplicate. Exact copies and paraphrases can go. Partial overlaps and deliberate variants usually stay.
  • Text matching fails both ways. It misses paraphrases that share few words, and it rates deliberate variants, like USD vs EUR payments, as near-identical.
  • The score orders the queue. It does not make the call. Above 80%, compare then delete. From 50 to 80%, archive. Below that, enrich thin cases and rescan.
  • Cleanup is half the job. ID-matched CSV re-imports and Smart Context stop new duplicates at the source.
  • Measure precision, not deletions. Duplicate count rewards deleting. Reviewer-confirmed precision by band rewards judgement.
  • Start small. One messy folder, a threshold of 80, two numbers recorded. Widen the scan only when that baseline holds.

Why Test Suites Grow Faster Than Coverage

Writing a test case used to take real effort. That effort was a filter. You wrote a case when you needed one.

AI removed the effort, and nothing replaced the filter. Duplicates now land in review, and review was built to judge quality, not to spot a case the suite already has.

The 2025 DORA report sees the same pattern across software teams. In a survey of nearly 5,000 technology professionals, 90% of respondents report using AI at work. It also found AI adoption "does continue to have a negative relationship with software delivery stability". Its explanation is simple: AI "doesn't fix a team; it amplifies what's already there".

In a test repository, that amplification is coverage inflation. The case count grows faster than the behaviours, risks and requirements those cases actually test.

Line chart indexed to Q1 equals 100 showing test case count rising to 148 while distinct requirements with coverage rise only to 108

Case count is inventory. Real test coverage is the number of distinct behaviours you check. The two can drift apart for a year before anyone notices.

Four Kinds of Duplicate, and Two You Must Keep

A scan surfaces four kinds of match. They look alike in the results. They need different actions.

TypeExample pairWhy it existsCorrect action
Exact duplicateThe same case title and steps appearing twiceAn import that ran twice, or a folder copied for a release and never merged backDelete the copy
Semantic duplicate"Verify user can log in with valid credentials" and "Check successful login for registered user"Two people wrote the same test in the same sprint without seeing each other's workDelete the copy after comparing the steps
Partial overlapCheckout with a saved card and checkout with a newly entered cardA shared workflow that diverges at the one step the test exists to exerciseKeep both, or factor the shared steps out
Legitimate variantCard payment accepted in USD and card payment accepted in EURCurrency conversion, fees, tax and settlement behave differently on the same pathKeep both, and record why in the case description

The bottom two rows are why nothing should be deleted automatically. A USD and an EUR payment case look redundant to any similarity measure. They protect different money flows.

So the rule for everything that follows: similarity decides what a reviewer looks at next. It does not decide what the repository forgets.

Detail makes that review fast. A test case with preconditions, steps and expected results is easy to judge. A bare title is a guess.

How Duplicate Detection Works in Test Manager

The obvious approach is text matching. It catches exact copies and one-word edits. Then it fails in two opposite ways.

It misses paraphrases. "Verify user can log in with valid credentials" and "Check successful login for registered user" test the same thing and share almost no words.

It over-matches variants. Swap USD for EUR and the text barely changes. The behaviour does.

Semantic search fixes the first problem by comparing meaning instead of words. Research backs it: Viggiato et al. combined text embeddings, similarity and clustering and reached an F-score of 83.47% in an industrial evaluation. That number belongs to their dataset, not yours. The approach holds.

The second problem needs a person. So the scan ranks. It never deletes.

What the scan does

  • Reads each case - title, steps and description become a vector embedding.
  • Finds neighbours - a nearest-neighbour search runs across the project or folder you pick.
  • Scores matches - every candidate gets a % Match from 0 to 100, in four bands.
  • Leaves the call to you - compare, ignore, or promote a better base case and recalculate the group.
  • Costs the same at any size - 5 credits whether it covers 100 cases or 5,000, charged only when it finds duplicates.
  • Runs one at a time - one scan per project. Scan large projects folder by folder.
Side by side comparison of a base test case and a duplicate with an AI generated similarity summary in TestMu AI Test Manager

The call gets made in the comparison view. It opens with a plain-language summary of how the two cases differ, then shows the diff, steps, field values and linked items. Check out this detailed documentation to deduplicate test cases and tune every scan setting.

Note

Note: A duplicate scan with the Test Deduplication Agent in TestMu AI Test Manager costs a flat 5 credits and is charged only when it finds at least one duplicate group, so checking whether a folder is clean costs nothing. Start free and scan one folder before planning a cleanup across the repository.

Turning a Match Score Into a Decision

A match score is an ordering. It tells you where to look first. TestMu AI groups scores into four bands and recommends starting at 80 and above. The threshold changes how much lands in your queue. It does not make the scan more accurate.

Match score strip from 0 to 100 divided into four bands with the recommended action for each: ignore, enrich, archive, and compare then delete

Do not read 90% as "90% likely to be redundant". Nothing calibrates the score that way. Measure it instead: for each band, divide the candidates a reviewer confirmed by the candidates reviewed. That is your precision by band, and it tells you where your own cutoff belongs.

Delete or archive?

Delete when you are sure. Archive when you are not. The difference matters:

  • Deletion is final - a case deleted through the scan cannot be restored, though its past test runs remain.
  • Archiving loses nothing - the case keeps its ID, version history, fields, tags, run results and linked issues, and unarchiving returns it to its folder unchanged.
  • Archiving still clears the noise - archived cases leave lists, search, runs, reports, AI generation context and future scans.
  • Both are on the record - every archive and unarchive shows in test case versioning with the user and time.
Duplicate test cases marked for deletion in TestMu AI Test Manager with the match band breakdown shown in the footer bar

Before you delete, read the footer. It splits everything you marked by band. Forty cases from above 80% is routine cleanup. Forty mostly from below 50% needs a second reviewer. Check out this detailed documentation to archive test cases, up to 500 at a time.

Prevention and Remediation Are Two Different Controls

A scan cleans up what exists. It has no say in what gets written next week. Teams that only scan end up scanning again two quarters later.

Diagram showing prevention controls at import, generation and migration feeding a test case repository, and a remediation chain of scan, score, human adjudication and outcome
MomentControlWhat it prevents
Bulk importA CSV re-import matched on TestCaseId, the column an export already carriesThe deterministic duplicate: a spreadsheet edited offline and pushed back as new rows instead of new versions
AI generationThe Smart Context memory layer, which queries a vector database for relevant existing cases and embeds them in the generation promptRegenerated coverage: the model writing a login test the suite already holds under different wording
MigrationOne-click migration from TestRail, Xray, Zephyr Scale or qTest, which rebuilds the source structure rather than flattening itStructure loss on arrival, and the hand-rebuilt cases that follow it
After the factThe duplicate scan, on a project or a folder, at a threshold you setNothing. This is the remediation half, and it works on what the three rows above let through

Two controls, two jobs

Smart Context, the memory layer, prevents duplicates from being created during AI generation. The duplicate scan finds duplicates that already exist in your repository.

One stops the inflow. The other drains the backlog. Scan without Smart Context and the backlog refills. Turn on Smart Context without scanning and the old duplicates stay. Both live in one test management platform, so the cases Smart Context reads are the same cases the scan cleans.

What Never to Merge, by Industry

The scan works the same everywhere. What changes is the pair that looks redundant and is not.

ContextHow duplication arrivesImplementation patternWhat must never be consolidated
Central QA organisationDifferent authors recreate login, search, CRUD and error handling under different titlesPilot one product folder at 80 and above, promote the best-written case to base, enrich title-only cases before judging themCases tied to different defects, requirements, environments or personas
CI/CD organisationManual acceptance catalogues drift while automated suites expand independentlyDeduplicate the manual source of truth on a cadence, and keep a separate selection layer for executable suitesTests whose code, fixtures, timing or fault-detection behaviour differ behind similar prose
Regulated enterpriseSuccessive releases and teams produce near-identical verification proceduresTreat similarity as candidate discovery only; archive rather than delete, and record reviewer approval before any removalAnything acting as controlled evidence or mapped to a mandated control
FintechPayments, onboarding, authorisation and reconciliation recur across squads in different languageConsolidate identical intent, then tag surviving cases by the dimension that makes them distinctVariants by transaction type, role, jurisdiction, limit, fraud state or settlement path
Healthcare and life sciencesAccess, data-entry and integration cases are copied as systems and versions evolveConservative thresholds, two-person review where the quality system requires it, evidence exported before cleanupPatient-safety-relevant behaviour and version-specific validation procedures
E-commerceCheckout, cart, search, promotion and refund tests are re-authored across teams every peak cycleRun folder-level scans between peak windows, when the regression library is being rebuilt anywayPayment method, currency, locale, device, tax, fulfilment and promotion-boundary variants
Multi-tenant SaaSOnboarding, RBAC, admin, billing and notification paths are recreated per module or teamCanonicalise the common path, then keep an explicit variant set per tier and per rolePermission and tenant-isolation cases that read alike and validate different privilege boundaries
Four grouped cards showing the dimensions that keep near-identical test cases separate: identity and authority, money and jurisdiction, platform and context, evidence and control

Regulated teams have the strictest rule, and it comes from the regulation. Where 21 CFR Part 11 applies, closed systems must keep records accurate and retrievable for the full retention period, plus time-stamped audit trails for anything that creates, changes or deletes a record. Changes "shall not obscure previously recorded information".

A permanent delete does not fit that. In regulated work, archive or export first, record the reviewer's approval, and delete only where your records policy allows it.

Cleaning the repository is not trimming the suite

Deduplication and test suite minimization get mixed up. They answer different questions.

DimensionRepository deduplicationTest suite minimization
Question it answersDo several human-readable cases describe the same intent?Which executable tests must run for this change, inside this budget?
Operates onNatural-language titles, steps and descriptionsTest code, its structure and its execution history
When it runsDesign time, on a human-owned cadenceRun time, on every pipeline invocation
How it is measuredConfirmed redundancy, precision by band, traceability preservedLTM reports 41.72% testing time saved against 41.02% for its predecessor, at a fault-detection rate of 0.84 against 0.81
Its safeguardA reviewer who knows the domainRTM keeps full requirement coverage while reducing redundancy, on 736 automotive system tests against 54 requirements

Keep them separate. Deduplication decides which written cases survive. Minimization decides which executable tests run. Regression testing depends on the second, and agentic test management covers where agents fit around both.

KPIs That Reward Judgement

Do not lead with duplicate count. It rewards deleting. A cleanup that removes 20% of the repository and three real variants with it made the suite worse and the dashboard better.

KPIHow to compute itWhat it tells you
Confirmed redundancy rateCases approved for removal divided by cases scannedThe real redundancy the repository was carrying
Precision by bandConfirmed duplicates divided by candidates reviewed in that bandWhere your own cutoff belongs, replacing an inherited one
Reviewer throughputCandidates adjudicated per reviewer hourWhether triage is saving more effort than it introduces
Repository growth rateActive cases at period end minus cases at period start, divided by cases at period startWhether prevention is working. This is the number that tells you a second cleanup is avoidable
Defect leakagePost-release defects divided by pre-release plus post-release defectsThe guardrail. It should not move after a cleanup, and a rise is the signal to stop
Requirement traceabilityRequirements with approved coverage divided by requirements in scopeWhether consolidation dropped a requirement mapping, which matters most in regulated work
Net capacity recoveredMaintenance plus execution plus other avoided effort, minus the review effort spentThe most defensible operational benefit, and the one to take to a budget conversation
Payback periodProgramme cost divided by annualised benefit, times 12 monthsEasier for an executive stakeholder to read than any reduction in test count

Treat defect leakage as a guardrail, not a benefit. Deleting duplicates does not prevent bugs. It frees reviewer time, and quality improves only if that time goes into uncovered risk.

A Rollout Strategy That Starts Small

The classic mistake is scanning everything at a low threshold and deleting whatever comes back. Do it in this order instead.

  • Snapshot first - export the repository and write down what must never be deleted.
  • Enrich thin cases - add steps and descriptions to title-only cases in the folders you will scan first.
  • Pilot one folder at 80 - compare every candidate and log each decision. You come out with your own precision by band.
  • Pick the best base - promote the strongest case in each group, and move anything worth keeping into it before removal.
  • Delete copies, archive overlaps - delete only confirmed copies. Archive anything you are unsure about.
  • Widen slowly - go folder by folder, and drop into the 50 to 80% band only once precision holds.
  • Turn on prevention, then rescan - with Smart Context and ID-matched imports in place, the next scan should return fewer candidates. If it does not, find where the inflow comes from.

The best moment to run this is right after a migration. Merging two legacy repositories exposes overlap neither team could see. Scan before the merged project becomes the working source of truth. One-click migration from qTest keeps folders, custom fields, attachments and linked Jira issues, and leaves the source read-only, so you can scan without touching the old system.

Settle with security first

  • Platform posture - TestMu AI security documentation covers SOC 2 Type 2, GDPR and CCPA compliance, TLS in transit, and production kept separate from testing and staging.
  • Embeddings - ask how embeddings are stored and retained as part of your DPA review.
  • Secrets - keep credentials, personal data and card numbers out of test steps. An organisation-level generation instruction can enforce this.
  • Retention - choose between archive and export before the first delete.

To keep a big repository reviewable in the first place, see managing test cases in large projects, and test management for how this fits the wider process.

Try It on Your Own Data

Start with data you already have.

  • Bring a CSV - export test cases from your current tool or spreadsheet, bring them in with CSV import, and run a duplicate scan in Test Manager. It costs nothing if it finds no duplicates.
  • Migrate a full project - move it from TestRail, Xray, Zephyr Scale or qTest with one-click migration, then scan it before your team starts running it.

Record two numbers from the first pass: candidates found and candidates confirmed. That is your baseline, and it beats any published threshold. For a screen-by-screen walkthrough of the scan, the review queue and archiving, see test deduplication in Test Manager.

Author

...

Abhishek Mishra

Blogs: 13

  • Linkedin

Abhishek Mishra is a Technical Product Manager at TestMu AI (formerly LambdaTest), where he owns Test Manager, the test management product. He has over 8 years of experience in product management and market analysis, spanning AI-native software testing, product strategy, and analytics. On TestMu AI, he authored guides on test management and test case management. Previously, he served as the Product Lead at IndiaClan and co-founded Gartley618 Technologies, a firm focused on quantitative trading and blockchain. He holds a B.Tech degree.

Reviewer

...

Shantanu Wali

Reviewer

  • Linkedin

Shantanu Wali is Vice President of Product Management at TestMu AI (formerly LambdaTest), where he owns several product lines across the testing platform, including the Real Device Cloud and the Digital Experience Testing Cloud. He has also contributed significantly to the development and scaling of KaneAI, TestMu AI's flagship GenAI-native testing agent that uses natural language to make software testing faster and more reliable in this AI era. He brings 7+ years of experience across software development and product management, starting as a backend developer at Infosys building solutions for Fortune 500 clients. Shantanu holds an MBA from IIM Calcutta and a B.Tech in Mechanical Engineering.

Add to Google preferred sources

Summarise with AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Duplicate Test Case Detection FAQs

Did you find this page helpful?

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests