Step parameters incorrectly marked in the reports

Description

The issue occurs only when a step has more than one parameter, and the value of at least one of those parameters is found as a part of another parameter (a parameter value is a substring of another parameter value).

E.g.
Step:
Given a stock of symbol $symbol and a threshold of $threshold
Step usage:
Given a stock of symbol ABC13DEF and a threshold of 13
In the report:
Given a stock of symbol ABC13 DEF and a threshold of 13

The issue is due to a flawed implementation in StepCreator class, method replaceParameterValue(). We need a more elaborated replace algorithm in order to take into account this kind of special cases.
Once a parameter is replaced with the value bearing the start/end placeholders, it should become "locked"; we don't want the next parameter value replacement to replace values into the previous ones.

Also the replacement of parameters values in step should be driven by parameters values length not by position to avoid partial replacements. (see parametrisedStep() method)

Assignee

Unassigned

Reporter

Catalin Sandila

Labels

None

Components

Fix versions

Affects versions

Priority

Minor
Configure