Git Product home page Git Product logo

Comments (10)

jonsamwell avatar jonsamwell commented on August 28, 2024

Hi @russell-sf,

Nice spot with this. I'll get it fixed up today.

from dart_gherkin.

russell-sf avatar russell-sf commented on August 28, 2024

I added some more info on what kind of gherkin is being generated by jira/xray. Its not just important for the input feature but needs to be reflected in the generated report as well. I hope you can support this.

from dart_gherkin.

jonsamwell avatar jonsamwell commented on August 28, 2024

@russell-sf all of the above is supported by the library (it was an obvious bug with tags on feature. The JSON reporter was done from someone else's PR so I'll go over it and make sure it is coded to spec.

from dart_gherkin.

jonsamwell avatar jonsamwell commented on August 28, 2024

@russell-sf I have updated the JSON reporter and fixed up the tag issue. Could you give it a try using the tags-modifications branch to see if it is what you are expecting. You can use a specific branch in your pubspec file by doing the below.


  gherkin:
    git:
      url: git://github.com/jonsamwell/dart_gherkin.git
      ref: tags-modifications

Let me know how you get on and I can get this merged into master and published

from dart_gherkin.

russell-sf avatar russell-sf commented on August 28, 2024

Hi. Thanks for the quick turnaround!

Looks good!

I am using this along with Flutter Gherkin which won't resolve with this branch. Can update Flutter Gherkin as well to update its dependency?

Thanks!

from dart_gherkin.

jonsamwell avatar jonsamwell commented on August 28, 2024

Hi @russell-sf

I've just created a Flutter Gherkin branch which relies on this branch. Add the below your pubspec file to test it (note that if you explicitly depend on gherkin in your pubspec not just flutter_gherkin you will need to set that to the git branch to avoid conflicts)

  flutter_gherkin:
    git:
      url: git://github.com/jonsamwell/flutter_gherkin.git
      ref: tag-and-json-report-changes

from dart_gherkin.

russell-sf avatar russell-sf commented on August 28, 2024

https://relishapp.com/cucumber/cucumber/docs/formatters/json-output-formatter#one-feature,-one-passing-scenario,-one-failing-scenario

Given

@a
Feature: Login
  User should be able to login successfully after clicking login button.

@b @c
Scenario: User logs in successfully
    Given I expect the user enters email
    And I expect the user enters password
    When user hits Login button
    Then user should land on next screen

Generates this report (notice the tags)

[ 
   { 
      "description":"",
      "id":"login",
      "keyword":"Feature",
      "line":1,
      "name":"Login",
      "uri":".\\test_driver\\features\\login.feature",
      "tags":[ 
         { 
            "line":0,
            "name":"Tags"  <<< THIS SHOULD BE "@a"
         }
      ],
      "elements":[ 
         { 
            "keyword":"Scenario",
            "type":"scenario",
            "id":"login;user logs in successfully",
            "name":"User logs in successfully",
            "description":"",
            "line":6,
            "tags":[ 
               { 
                  "line":5,
                  "name":"b"  <<< SHOULD BE "@b"
               },
               { 
                  "line":5,
                  "name":"c"   <<< SHOULD BE "@c"
               }
            ],
            "steps":[ 
               { 
                  "keyword":"Given ",
                  "name":"I expect the user enters email",
                  "line":7,
                  "match":{ 
                     "location":".\\test_driver\\features\\login.feature:7"
                  },
                  "result":{ 
                     "status":"passed",
                     "duration":4894000000,
                     "error_message":".\\test_driver\\features\\login.feature:7\nGiven I expect the user enters email\n\nInstance of 'GherkinStepNotDefinedException'"
                  }
               }
            ]
         }
      ]
   }
]

from dart_gherkin.

jonsamwell avatar jonsamwell commented on August 28, 2024

Hi @russell-sf

Thanks for this, I have fixed the issue with the tags, the line numbers and the way exception messages are printed.

I have updated the branch so you will need to force pub to re-install the branch in your project that uses Flutter Gherkin. The easiest way to delete the dependency and then add it again. You will know if it works as the tags will now have the '@' prefix.

If you think it is good to go I will publish the changes.

Jon

from dart_gherkin.

russell-sf avatar russell-sf commented on August 28, 2024

Hi Jon, this looks good. Reports are in correct format. Good to publish!

Thanks again for your prompt attention on this!

from dart_gherkin.

jonsamwell avatar jonsamwell commented on August 28, 2024

Latest version of both libraries published. Thanks for your help.

from dart_gherkin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.