Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    You can use scala with cucumber too
    The important thing to realise here is that cucumber is a documentation layer. The code that runs the tests is your framework layer. Keep those independent.
    It will mean less pain later
    Simon Paitrault
    @Freyskeyd
    ok
    Simon Paitrault
    @Freyskeyd
    Is it better to use selenium or something else?
    Dono Greeff
    @Greeff
    Personally I do not like selenium, it highlights the point though... It depends on you. What do you prefer/like. What gets the job done in the best time/effort
    Sorry for the vague answer, but it shouldn't be someone else's call as we do not know all the intricate details of how your project functions. You do, therefore, you are best qualified to make that call :)
    Björn Rasmusson
    @brasmusson
    You should should use the same programming language in your step definition/framework layer as your application does, and choose the flavor of Cucumber based on that:
    Ruby -> Cucumber-Ruby
    Javascript -> Cucumber-JS
    Languages on the JVM -> Cucumber-JVM
    C# -> Specflow
    PHP -> Behat
    Python -> Behave
    Dono Greeff
    @Greeff
    I dont fully agree with that. Even more so in a micro service architecture. With microservices one of the benefits is to use the language appropriate for that service. So you could have a complete mix of languages. Given this is a user workflow automation suite it should be considered as its own project/service and by that should also be free to dictate whatever tools/languages it needs to get the job done.
    Marit van Dijk
    @mlvandijk
    Thnx @Greeff for clarifying my point ;)
    Dono Greeff
    @Greeff
    No worries. Good to meet like-minded folk :)
    Marit van Dijk
    @mlvandijk
    @Freyskeyd if you're testing the UI, I'd assume you're also testing that it looks nice, can click buttons etc. If you're testing the process (i.e. as user can log in, order a product, get a confirmation - you don't have to do that through the UI). But starting at the UI is what most people do when they come from manual testing, it's the natural starting point. It's fine; just be aware there are other options
    Simon Paitrault
    @Freyskeyd
    @mlvandijk Yep I will do it steps by steps :P
    Marit van Dijk
    @mlvandijk
    If you're going to talk to browsers, you'll very likely end up using Selenium. As that's exactly what it's meant for. Other tools that talk to browsers, likely wrap (incorporate Selenium anyway)
    Unless you're using Cypress.io which talks to the browser differently
    But it's javascript and I don't javascript that well...
    @Freyskeyd Your example scenario might not be the best to automate through the UI though. I might start with some simpler ones
    Also, I know many people don't like Selenium, not sure of better alternatives (apart from possibly Cypress.io). In my experience this also has a lot to do with unstable xpaths etc. So my main tip there would be to get the developers to add unique labels to the UI elements you need for your tests (or better yet, do it yourself if you can ;) to you can operate on those, even if the screen layout changes. We do that and our tests through the UI are relatively stable...
    Ofcourse, if the application is developed by a different company, you can't do it that way
    Marit van Dijk
    @mlvandijk
    @Greeff likewise :)
    lwouis
    @lwouis
    Hi guys! I'm looking for a way to enforce a maximum line-length on my .feature files. I found some gherkin linters, but they seem broken/abandoned. What do you guys use to format or lint your .feature files? :)
    Oh I should add that my project is an angular app, so it would be a bit heavy to use a library not on npm (a ruby gem for example)
    Eric Kessler
    @enkessler

    @lwouis
    A few gherkin linters that I have used.
    https://github.com/funkwerk/gherkin_lint (idle)
    https://github.com/r-cochran/cuke_sniffer (abandoned)

    And a tool that I use when the 'out of the box' linters don't cover my needs and I need to write custom lints/queries.
    https://github.com/enkessler/cql

    yelisetti
    @yelisetti
    Hello all, I am looking for way to pass in Jenkins build parameters to a gherkin step. Is this possible?
    jenisys
    @jenisys
    @yelisetti I think that would depend more on the step implementation and cucumber implementation than on Gherkin.
    yelisetti
    @yelisetti
    @jenisys If I have a step such as Given <Args.jenkinsbuild> is present. The parameter here would be changing with every build, so using a step table or example table would not be ideal is what I am thinking? Is there any other way? It is my understanding that the step impl. will use the value given for the parameter and not get the value from somewhere and be able to set it in the step? please advise
    jenisys
    @jenisys
    @yelisetti This functionality is not available in Gherkin. You would need to use a text-template engine to generate the feature files from your parameter space. Otherwise, it is rather easy to use such parameters in the step implementation, but it is harder to show these parameters in Gherkin (output).
    yelisetti
    @yelisetti
    @jenisys Thank you for the help.
    Patrick
    @Patrick_Doering_gitlab
    Hi together, I have a question to gherkin or better to build the gherkin project. I wanted to add a new gherkin dialect and some new keywords. From the contributing to Gherkin page I get not enough information about how to customize or expand the actual gherkin. Can you help me?
    Especially what kind of steps do I have to do?
    jenisys
    @jenisys
    @Patrick You mean to ass a new language ? Add a record to gherkin-languages.json file and provide a pull-request on Github. see https://github.com/cucumber/cucumber/blob/master/gherkin/gherkin-languages.json
    jw1121
    @jw1121
    Hi, Anyone here know how to use Gherkin to parser .feature file? I want to create separate tool which runs through feature and run specific rules based on Scenario.
    jw1121
    @jw1121
    btw i'm trying to do this in java
    jenisys
    @jenisys
    @jw1121 Have you looked at the Java implentation of the Gherkin parser in the Cucumber repo at Github ?
    jw1121
    @jw1121
    @jenisys I'm new to Gherkin and not sure where to start looking in the code.
    jenisys
    @jenisys
    @jw2121 https://github.com/cucumber/cucumber/blob/master/gherkin/gherkin.berp — This the URL to the Gherkin grammar that is currenly used. In the subdirectories are language implementation of a Gherkin parser in this language. Look at the Java implementation and start from there.
    Eric Kessler
    @enkessler
    Now see, if you were making the tool in Ruby then I would have had you covered. ;)
    jw1121
    @jw1121
    Ok how do i export as a library to my java project?
    jw1121
    @jw1121
    @jenisys @enkessler do you know how to export Gherkin to your project?
    jenisys
    @jenisys
    @jw1121 I am not quite sure what you mean with export. Have you looked at the Gherkin parser implementation ?
    jw1121
    @jw1121
    @jenisys Gherkin-java seems to be just a wrapper for gherkin-go and its uses c21e to process the request. What i'm trying to do is extract out Gherkin as library (jar) from cucumber and use in my java program.
    jw1121
    @jw1121
    I’m assuming i’ll have to create this library out of gherkin-java, gherkin-go, and c21e. Hoping it would be easy as importing few library through maven.
    Eric Kessler
    @enkessler
    @jw1121 Isn't gherkin-java already a library? Sure, it uses that other stuff under the hood but is the wrapper that you are talking about a jar that you can include in your project?
    jw1121
    @jw1121
    @enkessler
    Maybe
    Im missing some thing when i run mavem on gherkin-java it doesnt include c21e or gherkin-go.
    Marit van Dijk
    @mlvandijk
    @jw1121 Have a look at Gherkin-java here: https://github.com/cucumber/cucumber/tree/master/gherkin/java
    Check the Cucumber-jvm pom.xml for the gherkin dependency: https://github.com/cucumber/cucumber-jvm/blob/master/pom.xml
    SimitTomar
    @SimitTomar

    @/all: Have released a Module for Cucumber & WebdriverIO, feel free to check it out and provide your valuable feedback:

    wdio-cucumber-parallel-execution – A Cucumber & WebdriverIO capability for running your Automation Pack in Parallel at Scenario Level (rather than the default Feature File Level) - https://www.npmjs.com/package/wdio-cucumber-parallel-execution

    gittadesushil
    @gittadesushil
    What is the suggested alternative for ScenarioDefinition in Gherkin.dll 6.0.0.0. Looks like it change from 5.0.0.0 to 6.0.0.0.