alexej-strelzow / testcafe-cucumber-typescript

A complete Framework for End-to-End Testing
MIT License
23 stars 11 forks source link

After adding cucumber tags to examples in scenario outline, the html report is not getting generated due to jsonparser error #7

Closed arpanoberoi closed 2 years ago

arpanoberoi commented 3 years ago

@alexej-strelzow : Hi Alexej, Really appreciate this framework, this helped me in getting answers to most of the real time issues. One of the challenge , I am facing is when we put the tags to examples(present in scenario outline), the testcases got executed successfully. However, during the report generation , json-formatter is throwing the error. Below is the piece of code which I updated in github.feature file -

@github Feature: Searching for TestCafe on GitHub

I want to find TestCafe repository on GitHub

Scenario Outline: Searching for TestCafe on GitHub Given I open the GitHub page When I am typing my search request "" on GitHub And I am pressing enter key on GitHub Then I should see that the first GitHub's result is DevExpress/testcafe Examples: |Search| |TestCafe| |Cucumber| @testtag Examples: |Search| |Typescript|

Error - TypeError: Cannot read property 'location' of undefined at \testcafe-cucumber-typescript\node_modules\@cucumber\cucumber\lib\formatter\json_formatter.js:185:34

I tried with other formatters also like message(ndjson) but couldn't able to generate the report.

alexej-strelzow commented 2 years ago

Hi @arpanoberoi, sorry for the late reply. I am currently updating a bunch of stuff, there it works (if I add to the feature (see below). You are even able to execute just 1 example by tagging it. Check this repo in a couple of hours ;-)

@github
Feature: Searching for multiple things on GitHub

  I want to find some repositories on GitHub

  Scenario Outline: Searching for multiple things on GitHub
    Given I open the GitHub page
    When I am typing my search request "<Search>" on GitHub
    And I am pressing enter key on GitHub
    Then I should see that the first GitHub's result is DevExpress/testcafe
    Examples:
      |Search|
      |TestCafe|
      |Cucumber|
    @wip
    Examples:
      |Search|
      |Typescript|

Stay tuned!

Alexej

alexej-strelzow commented 2 years ago

@arpanoberoi does the new version resolve your issue?