8000 GitHub · Where software is built
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Include Examples table header in cucumber.json for Scenario Outlines #2247
Closed
@SDETShubham

Description

@SDETShubham

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

Currently, when running Scenario Outline tests, the generated cucumber.json report contains only the values of the Examples table, but not the headers (i.e., parameter names).
As a result, when consuming the JSON for reporting or automation analysis, it becomes difficult to map values back to meaningful keys.

 {
            "result": {
              "duration": 2448095300,
              "status": "passed"
            },
            "line": 43,
            "name": "User logs into application with same valid credentials",
            "match": {
              "location": "org.Spurqlabs.Steps.CommonSteps.userLogsIntoApplicationWithSameValidCredentials(io.cucumber.datatable.DataTable)"
            },
            "after": [
              {
                "output": [
                  "11-Apr-2025 09:40:47"
                ],
                "result": {
                  "status": "passed"
                },
                "match": {
                  "location": "org.Spurqlabs.Core.Hooks.beforeStep(io.cucumber.java.Scenario)"
                }
              }
            ],
            "rows": [
              {
                "cells": [
                  "UserName2",
                  "Password2"
                ]
              }
            ],
            "keyword": "When "
          },

✨ What's your proposed solution?

In the JSON output, include a field like "exampleHeaders" or "exampleKeys" inside each scenario outline instance. For example:

"rows": [
              {
                "cellsHeader": [
                  "UserNameList",
                  "PasswordList"
                ]
              },
             {
                "cellsValue": [
                  "UserName2",
                  "Password2"
                ]
              }
]

⛏ Have you considered any alternatives or workarounds?

Cucumber.json

📚 Any additional context?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0