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

Disabling behat.run-server in project.yml doesn't take effect when running Behat tests #1382

Closed
geerlingguy opened this issue Apr 14, 2017 · 3 comments

Comments

@geerlingguy
Copy link
Contributor

My system information:

  • Operating system type: macOS
  • Operating system version: 10.12.4
  • BLT version: 8.8.1

When I run this command:

blt tests:all --define behat.run-server=true --yes -v

I get the following output:

tests:behat >
[info] Killing all processing containing string 'runserver'
[info] Killing all processes on port 8888
sh: 1: lsof: not found
➜  Launching PHP's internal web server via drush.

And I expected this to happen:

When I set the following in my blt/project.yml:

behat:
  server-url: http://local.example.com
  run-server: false

...then I would expect the drush built-in PHP server to not be started. The use case is related to #1366, but there are other valid reasons for not using drush runserver.

@geerlingguy
Copy link
Contributor Author

Thanks for being a 🐥 (rubber duck). When I added the title on this issue, I realized why my override isn't working.

Passing in --define behat.run-server=true on the command line overrides my override. D'oh!

@arun9989
Copy link

May I know why we need to disable behat.run-server as false in settings? I could not make work below command:

blt tests --define tests.run-server=true --ansi --yes --verbose

[error]  Behat is not configured properly. Please run `blt doctor` to diagnose the issue.
[error]  Command `tests:behat:run ` exited with code 1.

@dpagini
Copy link
Contributor

dpagini commented Jun 26, 2018

I think when you are working locally, the thought is you have a web server running your site that behat can hit and use. When you are testing on a CI environment, you need to provide a webserver. This tests.run-server command uses a drush webserver to serve up your pages on CI.

Does that help?

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

3 participants