Code Monkey home page Code Monkey logo

Comments (3)

mmoreram avatar mmoreram commented on May 25, 2024

Step prefixes are only for comprehension purpose. So, you can call a step using When, Then and Given, that program will do the same. Also, these words are only for trying to understand what exactly do the step ( "Then I am logged" is not the same as "Given I am logged", but you cant define both.
So listing steps is not really usefull, because you can change word with no effects.

from behat.

everzet avatar everzet commented on May 25, 2024

Thanks @mmoreramerino. I'm closing this...

from behat.

zimathias avatar zimathias commented on May 25, 2024

Thanks for the explanation. I didn't know that the type of step wasn't related to the function definition.

As you've outlined, the type of step is useful to understand what the step actually do - (ie "Then I am logged" is different from "Given I am logged"). Then it seems that having the type of the step listed in the step definition would provide more context to understand what the step does?

Which outline is the most helpful when a developer write tests with behat?

$ behat --steps       
'/^I should be redirected to "([^"]*)"$/'  

Or

$ behat --steps       
Then '/^I should be redirected to "([^"]*)"$/'  

from behat.

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.