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

How do I upgrade 2.x to 3.x? #799

Closed
MacDada opened this issue Oct 20, 2015 · 3 comments
Closed

How do I upgrade 2.x to 3.x? #799

MacDada opened this issue Oct 20, 2015 · 3 comments

Comments

@MacDada
Copy link

@MacDada MacDada commented Oct 20, 2015

Hi,

I have projects that use Behat v.2.5.5. How do I upgrade to 3.x (v.3.0.15)?

I looked into https://github.com/Behat/Behat/blob/v3.0.15/CHANGES.md#300beta1--2013-08-13
It does tell me that u made some major changes (like New suite-centric architecture) but it doesn't tell me how do I respond to those changes.

Any document/help on that? Or am I supposed to look at the diff of changes and come up with the test fixes myself?

@jakzal

This comment has been minimized.

Copy link
Contributor

@jakzal jakzal commented Nov 3, 2015

There's no migration document as far as I know. As long as you didn't rely on mink too much, the migration isnt't hard.

On a high level you'll need to:

  • update the configuration file (suites mentioned by you)
  • update your contexts to implement the Context interface instead of extending the base context class
  • instead of using sub-contexts, configure all of them in behat.yml (all contexts are equal now!)
  • write a cookbook on migration ;)

I've done this in past and it wasn't really hard. However, my contexts were decoupled from mink and I didn't have too many dependencies between contexts.

I'm happy to help you with specific issues that might arise as you proceed with the migration.

@djdevin

This comment has been minimized.

Copy link

@djdevin djdevin commented Nov 25, 2015

We just did a successful migration from Behat 2 to 3, it was alright.

Besides the above, if you used chained steps (new Given("I do another step")) in your contexts those no longer work, you have to make direct calls to the steps.

We didn't have any to update any .feature files (~160 scenarios of varying complexity), we used DrupalExtension and Mink.

@everzet

This comment has been minimized.

Copy link
Member

@everzet everzet commented Dec 30, 2015

I think upgrade hurdle was always overrated. We could do better job at docs, though. @djdevin care to contribute a cookbook to https://github.com/behat/docs ? :)

@everzet everzet closed this Dec 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.