gauge-dotnet icon indicating copy to clipboard operation
gauge-dotnet copied to clipboard

Step Text in ExecutionContext still includes dynamic parameters instead of values

Open raweaver opened this issue 4 years ago • 0 comments

We are trying to use execution hooks to log step execution (and other content), however, we found that the ExecutionContext.CurrentStep.Text is the actual step text. This is fine for typical steps. However, steps with dynamic parameters and steps within dynamic parameters in concept files still print the parameter names instead of the values. It would be beneficial to get the step text as executed with the parameter values. For example, the example.spec includes a step with dynamic parameters:

* The word <Word> has <Vowel Count> vowels.

In the BeforeStep execution hook, the step text is presented as the actual step text:

The word <Word> has <Vowel Count> vowels.

Would it be possible to present the step text as the executed step text, such as:

The word "Gauge" has "3" vowels.

Other options may be to add more properties to ExecutionContext.StepDetails to include the actual text and the executed step text. Another option may be add the parsed step text and a list of parameter values (as strings) to to ExecutionContext.StepDetails.

I wanted to get your thoughts on this request.

Thank you!

Version information

Gauge version: 1.1.6 Commit Hash: 3af456f

Plugins

dotnet (0.3.1) html-report (4.0.12) screenshot (0.0.1) xml-report (0.2.3)

raweaver avatar Feb 13 '21 18:02 raweaver