Skip to content

Scenario Outline DataTable variables not resolved in JSON report #28

@lslonina

Description

@lslonina

👓 What did you see?

When using Cucumber Scenario Outline with parameterized DataTables, the generated JSON report contains literal placeholder variables instead of their resolved values. This behavior has changed in recent Cucumber versions.

Current Behavior

In scenarios with Scenario Outline Examples and DataTable steps that reference example parameters, the JSON report shows unresolved placeholders like <country> and <username> instead of the actual values from the Examples table (e.g., Poland, alice).

✅ What did you expect to see?

The JSON report should contain the resolved variable values from the Examples section, matching the behavior when the scenario executes.

📦 Which tool/library version are you using?

cucumber-jvm 7.31.0

🔬 How could we reproduce it?

Feature File

Feature: User operation with parameters

Scenario Outline: User operation with parameters
Given the service id is <id>
When the system in use is <system>
And the following details for user:
| attribute | value |
| username | <username> |
| country | <country> |

Examples:
| id | system | username | country |
|  | SAP | alice | Poland |
| 202 | Oracle | bob | Germany |

JSON Report Issue

The generated JSON report shows:

"cells": [
"attribute",
"value"
],
[
"<username>",
"<country>"
]

Expected output:

"cells": [
"attribute",
"value"
],
[
"alice",
"Poland"
]

Steps to Reproduce

  1. Create a Scenario Outline with Examples containing test data
  2. Add a step that uses a DataTable with placeholders referencing example columns
  3. Generate a JSON report
  4. Examine the report - the DataTable cells will show <placeholder> instead of resolved values

📚 Any additional context?

This behavior has recently changed - in earlier versions, the variables were correctly resolved in the report output. This may be related to changes in how the JSON report generator processes steps now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions