Coder Social home page Coder Social logo

Behat integration about fastest HOT 5 CLOSED

liuggio avatar liuggio commented on June 2, 2024 1
Behat integration

from fastest.

Comments (5)

liuggio avatar liuggio commented on June 2, 2024 1

fixed in #12

from fastest.

liuggio avatar liuggio commented on June 2, 2024

Looks great to me 👍

You think that creating a "behat-fastest-driver" would provide some benefits?

What about the output, the adding value of BDD is the documentation did you thought also about this?

The cookie is a good hack but some tests may fails if they do some assertion on the cookies, but I think we could think about it later like a minor issue...

We are on the right way :)

from fastest.

diegosainz avatar diegosainz commented on June 2, 2024

Great :) - lets continue to assess common ground on the expected integration...

Behat version I forgot to mention that am implementing this on behat 2.5, with the Symfony2 extension and using Mink with webdriver driver.

A downside of this approach is that the minimum "runnable" unit will be a file containing scenarios, and there could be files with many scenearios and other files with just one, so the load won't be always evenly distributed among the fastest processes.

*About the behat-fastest-driver, what do you mean? - something like behat passing on the tests within behat to *fastest?

About the BDD documentation - I am looking at this implementation from the perspective of running behat scenarios in parallel mainly to accelerate continuous integration. The BDD process should remain the same - just execute your scenarios without fastest or wait for the output of fastest that will provide the details of the failed scenarios. Or what aspect of documentation do you mean?

About the cookie hack I have been thinking about it - we can unset that cookie $_COOKIE after reading it to avoid any side effects, or maybe use a X-FASTEST custom HTTP header. We would have to think how to inject the cookie or header to each page that is called by the Mink driver, to ensure that every request made by the browser to the server has the correct header/cookie in order for Symfony to connect to the correct database. Right now I am using a Behat SubContext to inject the cookie at the same point the authentication is made (in my case that step also needs to create an authenticated cookie on the client side and inject it to the browser). I don't quite like the complexity of this part and I have been thinking on how to make the Symfony/Behat/Mink integration easier - any ideas?

from fastest.

diegosainz avatar diegosainz commented on June 2, 2024

About the downside - no longer true - all I had to do is to get recursively the scenarios and their file and line number, that gives an line per scenario as output that can be ran in parallel by fastest/behat :

/somepath/Features/featureOne.feature:10
/somepath/Features/featureOne.feature:20
/somepath/Features/featureTwo.feature:10
/somepath/Features/featureTwo.feature:20

So we may have, maybe --list-features and --list-scenarios options to allow the user to select the level of output desired: at feature-level or scenario-level.

from fastest.

liuggio avatar liuggio commented on June 2, 2024

this sounds lovely and if you keep it simple the result will be awesome,
I can't wait the implementation :)

from fastest.

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.