Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behat suite should be covering the features of the extension #10

Open
stof opened this issue May 3, 2017 · 1 comment
Open

Behat suite should be covering the features of the extension #10

stof opened this issue May 3, 2017 · 1 comment

Comments

@stof
Copy link
Contributor

stof commented May 3, 2017

Currently, the behat suite is not covering the extension. It is an example project using the extension to cover the example-app. This has several drawbacks:

  • it does not allow you to cover error cases of the extension (as you are not asserting the behavior of the extension but using it and so an error would be a CI failure)
  • it does not give meaningful errors on failure
  • it makes it hard to test different configurations
  • it does not allow to use the scenarios as documentation (as scenarios are not describing the usage of the extension but of the example app)

I know where your setup comes from: you copied MinkExtension, which suffers from these flaws (rewriting its suite is at the bottom of my todo-list since years).
You can look at the Symfony2Extension for a suite which would run Behat inside its context instead (scenarios are not very descriptive, as they still rely on an example app rather than describing everything in the feature file, but it still solve some of the cases above)

@ciaranmcnulty
Copy link
Owner

The problem I had trying to write features was that there isn't really any behaviour to test - it's simple API translation pretty much everywhere.

Any ideas on how to capture the behaviour as scenarios would be appreciated - as you rightly say the Symfony2Extension ones still strongly depend on an example app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants