I am testing new features in the new project branch, which has a new URL. I need to dynamically change the base url for Behat tests. How can I do it?
Asked
Active
Viewed 616 times
1 Answers
0
The right way of doing that would be to change the base_url
in your behat.yml configuration. It's a new branch, it has new features, there's no reason why you can't or shouldn't change the test configuration for it. When you merge it with the master, you simply leave the config out of merge or change the base_url
back.
If you want to do it via the command line still, see this question for details. This might not override the original value if you do have a config though, I've never tested this.
BEHAT_PARAMS="context[parameters][base_url]=http://google.fr" bin/behat

Community
- 1
- 1

Ian Bytchek
- 8,804
- 6
- 46
- 72