Help documentation

Scenario Duplicate Analyzer

The Scenario Duplicate Analyzer can show you duplication across your scenarios. The analyzer looks for groups of steps that are repeated across the entire test suite. The analyzer can handle cases like patterns that are nested within other patterns and patterns that overlap with each other.

While searching for patterns, the analyzer takes parameter data into account.

Consider two scenarios:

Scenario 1.
Add Items:
  • search books having text "Agatha Christie"
  • find book "Five Little Pigs"
Scenario 2.
Add Items:
  • search books having text "Agatha Christie"
  • find book "Five Little Pigs"
  • search books having text "science"
  • find book "On The Origin of Species"

The analyzer will recognize the two blocks as duplicates.

To use the analyzer, right click on the project you wish to analyze.

Scenario analyzer menu

Once the menu item is selected, the scenario duplicate analyzer view shows duplicate results sorted by the number of occurrences. While analyzing large test suites, a progress bar will show in the bottom right corner of the screen.

Scenario analyzer results

Expanding the results shows a list of occurrences, sorted by the number of occurrences.

Scenario analyzer expanded results

Double clicking on an entry shows the text in the corresponding scenario in the editor.

Scenario analyzer highlight pattern

The results can be filtered based on the number of occurrences and the number of lines of duplication to consider.

Scenario analyzer filter results

After viewing duplicates, you can use either the Extract Concept refactoring or the Push to Implementation refactoring in order to remove the duplication.