-
Notifications
You must be signed in to change notification settings - Fork 51
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
Question - see the @javascript in a broweser #25
Comments
@iefrati - If you're running those tests within Drupal VM, there's no real GUI to go along with Drupal VM, so all browser tests are run 'headless' within the VM. There are ways to get screenshots of the headless browser, I think, but I haven't tried doing that for a very long time. The alternative is to install Java and the other dependencies on your localhost, and run all the tests there (so it can use your own FireFox/Chrome/etc. browser), and just run the tests against the site built inside Drupal VM. |
@geerlingguy I tried to run it from outside the vm, but I am getting because my @BeforeSuite has replacing localhost with 127.0.0.1 which I am not sure why I am getting this since the user is testing, and I can access the db with it |
Running the tests from your local (host) is an option as long as the test does not need direct access to the database, unless we could proxy those requests to the VM. But then still, that part of the development environment is not portable while that's the exact reason why we're playing with Vagrant, to create a portable development environment. In our case the test code bootstraps Drupal to be able to do some stuff we don't have to cover with the Selenium tests. Similar to what @iefrati does with his
Adding v.gui = true
spins up a VirtualBox window but doesn't magically (install and) launch a GUI. Using I'm looking at https://github.com/Anomen/vagrant-selenium for some inspiration. I want to do minimal changes to just make it work. |
Note also—you can capture screenshots on failed tests (or really any time you need) using something along the lines of: acquia/blt#1152 (comment) |
With all your respect, capturing screenshots on failed tests feels like debugging Drupal code with https://www.drupal.org/project/devel It is crazy helpful, like you say in acquia/blt#1152 (comment). But being able to interact with a browser while the test is running is like step-debugging Drupal code. It's more efficient. Meanwhile, we managed to get a visible browser while running tests with Selenium, see https://github.com/Kanooh/drupal-vm/tree/paddle-selenium-support |
I use the @javascript on some of my behat testing, either to see what is going on in the browser or for some debugging.
When running behat test with selenium in a drupal vm, I do not get the browser window. Do i need to configure something unique?
my behat.local.yml is:
The text was updated successfully, but these errors were encountered: