Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cucumber 2.3.2: Step data tables not present in JSON report #948

Closed
azohra opened this issue Feb 10, 2016 · 4 comments
Closed

Cucumber 2.3.2: Step data tables not present in JSON report #948

azohra opened this issue Feb 10, 2016 · 4 comments

Comments

@azohra
Copy link

azohra commented Feb 10, 2016

Hi,

I have just recently converted to using the JSON formatter as it is much easier to merge results when running with parallel_tests. However, I noticed that my step tables are not being written to the default JSON report which cucumber builds. Is this expected behavior? If so, are there any alternative paths available to me?

Example Scenario:

  Scenario: Leave First Name Blank
    When I go to the registration page
    And I register an account using:
      | register_first_name      |               |
      | register_last_name      | Bueller       |
      | register_username       | ~username       |
      | register_phone             | 4112223333      |
      | register_extension        | 999           |
      | register_password        | ~password     |
      | register_agree_to_terms  | ~true         |
      | register_signup_for_mail | ~false        |
    Then exactly (1) [validation_error] should be visible
    And I should not be logged in

Example JSON output:

      {
        "id": "member-registration;leave-first-name-blank",
        "keyword": "Scenario",
        "name": "Leave First Name Blank",
        "description": "",
        "line": 7,
        "type": "scenario",
        "before": [
          {
            "match": {
              "location": "features/support/env.rb:77"
            },
            "result": {
              "status": "passed",
              "duration": 15000
            }
          }
        ],
        "steps": [
          {
            "keyword": "When ",
            "name": "I go to the registration page",
            "line": 8,
            "match": {
              "location": "features/step_defenitions/cnc_steps.rb:114"
            },
            "result": {
              "status": "passed",
              "duration": 2292967000
            }
          },
          {
            "keyword": "And ",
            "name": "I register an account using:",
            "line": 9,
            "match": {
              "location": "features/step_defenitions/cnc_steps.rb:119"
            },
            "result": {
              "status": "passed",
              "duration": 2258135000
            }
          },
          {
            "keyword": "Then ",
            "name": "exactly (1) [validation_error] should be visible",
            "line": 18,
            "match": {
              "location": "features/step_defenitions/global_steps.rb:28"
            },
            "result": {
              "status": "passed",
              "duration": 77459000
            }
          },
          {
            "keyword": "And ",
            "name": "I should not be logged in",
            "line": 19,
            "match": {
              "location": "features/step_defenitions/cnc_steps.rb:94"
            },
            "result": {
              "status": "passed",
              "duration": 35463000
            }
          }
        ],
        "after": [
          {
            "match": {
              "location": "features/support/env.rb:84"
            },
            "result": {
              "status": "passed",
              "duration": 66000
            },
            "output": [
              "\nmagic_credentials:\n Generated Username: [email protected]\n Generated Password: u73u1hxgu2\n\nvisibility_checks:\n - Found 1 validation_error (expected exactly 1)\n\nscenario_timer:\n 4.7 seconds"
            ]
          }
        ]
      },
@azohra azohra changed the title Cucumber 2: Data tables not present in JSON report (is this expected?) Cucumber 2.3.2: Step data tables not present in JSON report Feb 10, 2016
@azohra
Copy link
Author

azohra commented Feb 17, 2016

Hey folks, Am I posting in the wrong place? It would be great to understand if this is an issue or simply a limitation of the JSON formatter.

@brasmusson
Copy link
Contributor

The data tables was lost from v2.0.0 to v2.0.1 when the JSON formatter was rewritten to the new formatter API (#851), which fixed at lot of other problems with the JSON formatter. The JSON formatter should be updated to include the data tables again.

@azohra
Copy link
Author

azohra commented Feb 18, 2016

@brasmusson is there anywhere to submit a donation / 'buy a beer' or any other form of monetary contribution to yourself or the cucumber group? I am very thankful for this fix.

@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants