cucumber-jvm icon indicating copy to clipboard operation
cucumber-jvm copied to clipboard

Use feature parameterized name for example display name

Open betty-domain opened this issue 2 years ago • 3 comments

🤔 What's the problem you're trying to solve?

When I'm using junit4 to run my cucumber test, I can parameterized my feature scenario outline name and it was complete before execution phase to create X scenarios where display name was corresponding feature nawe with corresponding parameters value Now i'm using junit-platform-engine and my example are executed with name "Example #1, Example #2..." so i'm loosing functional information about what my test is doing

Example :

Feature file : Scenario Outline : My Contract with option <codeOption> Given a contract with option <codeOption> When I want to show it Then I see the name of Contract <contractName>

 Examples:
   | codeOption | contractName  |
   | '01'               | 'Contract A'     |
   | '02'               | 'Contract B'     |
   | '03'               | 'Contract C'     |

When using Junit4 I can see in execution tests details :

  • My Contract with option '01' : Passed
  • My Contract with option '02' : Passed
  • My Contract with option '03' : Failed

Now using Junit platform Engine (Junit5) I can see in execution tests details :

  • My Contract with option 'codeOption'
    • Examples
      • Example 1 : Passed
      • Example 2 : Passed
      • Example 3 : Failed

I don't know with business case is failed, I have to open the feature file and to count examples to find which one failed.

✨ What's your proposed solution?

Reuse junit4 mechanism to use parameterized display name if parameters are found in scenaio outline name

⛏ Have you considered any alternatives or workarounds?

I haven't find a workaround for the moment

📚 Any additional context?

betty-domain avatar Apr 28 '23 15:04 betty-domain