Skip to main content

Step Duplicate Detection

TestPlanIt can scan your test cases for repeated step sequences — consecutive steps that appear in multiple cases — and convert them into reusable Shared Steps in one click. This reduces duplication, simplifies maintenance, and keeps your test suite consistent.

How Detection Works

The scanner compares all test cases in a project pairwise, looking for contiguous runs of steps that appear in more than one case. It uses fuzzy matching (Levenshtein similarity ratio of 85% or higher), so minor wording differences between otherwise identical steps are still detected.

When a matching sequence is found across multiple cases, it is grouped into a single match result. Each result shows:

  • Step count — the number of consecutive steps in the sequence
  • Matched steps — a preview of the step text
  • Cases count — how many test cases contain this sequence

Minimum Step Threshold

By default, the scanner requires at least 3 consecutive matching steps to report a match. This avoids noise from single-step overlaps that are usually coincidental.

Running a Scan

  1. Navigate to your project and click Shared Steps in the left sidebar.
  2. Click Find Duplicates in the toolbar to open the Step Duplicates page.
  3. Click Scan to start a scan. A progress bar shows comparison progress as a percentage.
  4. When the scan completes, matching results appear in the table automatically.

Only one step duplicate scan can run per project at a time. You can cancel an in-progress scan using the X button next to the progress bar.

note

Each new scan replaces the previous scan's pending results. Dismissed and converted matches are preserved across rescans.

Reviewing Results

The results page lists all matched step sequences sorted by step count. Each row shows the matched steps preview, the number of affected cases, and available actions.

You can:

  • Sort by step count or case count
  • Filter by case name
  • Narrow by size with the Min. Steps and Min. Cases dropdowns
  • Select multiple rows for bulk dismissal
  • Click a row to open the conversion dialog

Narrowing a Large Scan

A scan over a big project can return more matches than are worth reviewing one by one. The Min. Steps and Min. Cases dropdowns hide the smaller matches so the longest sequences, and the ones shared by the most test cases, stay in view.

  • Both default to All. Each dropdown offers only the counts actually present in the current scan, so every choice narrows the results — 3+ appears only if some match has at least 3 steps.
  • The two filters combine: the options offered in one reflect the matches still showing under the other.
  • Selections are remembered per project, so returning to the page keeps the view you left it in.
  • Changing either filter — or the case-name search — clears any row selection, so a bulk dismissal only ever applies to rows you picked in the list in front of you.

When nothing meets the current filters, the table says so and prompts you to lower the minimums.

Converting to Shared Steps

Click any result row to open the conversion dialog. The dialog shows:

  1. Matched Step Sequence — a preview of the detected steps. You can edit the steps before conversion if needed.
  2. Affected Test Cases — all test cases containing this sequence, each with a checkbox. Uncheck any cases you want to exclude from conversion.
  3. Shared Step Group Name — auto-populated from the first step's text. Change it to something descriptive.

If the matched steps have since been deleted from the test case, the dialog reports that the match is stale instead of opening an empty editor — dismiss it and run a new scan.

Click Convert to Shared Steps to create the shared step group. The conversion:

  • Creates a new Shared Step Group with the specified name and steps
  • Removes the matched steps from each selected test case
  • Inserts a shared step reference in their place
  • Creates a version snapshot of each modified test case

The conversion runs as a single atomic transaction — either all cases are updated or none are.

After conversion, a toast notification appears with a link to view the new shared step group.

Dismissing Matches

If a match is a false positive — the steps look similar but serve different purposes — you can dismiss it:

  • Single dismiss: Click a result row to open the dialog, then click Dismiss Match
  • Bulk dismiss: Select multiple rows using checkboxes, then click Dismiss

Dismissed matches are removed from the results list and will not appear again until the next scan.

Best Practices

  • Run scans periodically as your test suite grows to catch new duplicates early
  • Review before converting — not all repeated steps should be shared. Steps that happen to look similar but test different behaviors are better left independent
  • Use descriptive names for shared step groups so they are easy to find and reuse
  • Convert selectively — if a sequence appears in 10 cases but only 8 should be converted, uncheck the other 2 in the conversion dialog. Unchecked cases keep their original steps unchanged