Unable to run e2e or Frontend Tests in Vagrant VM
See original GitHub issueThe Vagrant VM is not able to run either e2e or frontend tests. This is due to a couple of issues:
- For a restarted machine, CHROME_BIN is likely to be absent
- Chromium is not installed
- xvfb is not installed
- a proper environment variable for the screen for xvfb is not exported
Steps to solve this: I advise using this guide as a starting point.
- Install Chromium on Vagrant machine
- Install Xvfb on Vagrant machine
- Increase default memory on VM to 2048mb to allow frontend tests to run without crashing
- Set and export proper screen type variable for Xvfb and Chromium
- Refactor frontend tests to change the commands they use to invoke tests if the
VAGRANT
environment variable returns true - Refactor e2e tests to properly invoke Xfvb if
VAGRANT
environment variable returns true - Figure out why Chrome/Chromium breaks when invoked by Xvfb
Issue Analytics
- State:
- Created 8 years ago
- Comments:32 (32 by maintainers)
Top Results From Across the Web
How run headless angular2 e2e tests using protractor in ...
I am running ubuntu-16.04 using Vagrant and ...
Read more >oppia/oppia-chat - Gitter
were you thinking that we'd want to build oppia in vagrant for testing? ... e2e tests running automatically on travis, just like the...
Read more >Just Say No to More End-to-End Tests - Google Testing Blog
Even if a product contains millions of lines of code, if a unit test fails, you only need to search that small unit...
Read more >Troubleshooting | VVV
Use vagrant ssh to enter the VM and run the above command to test if the VM can SSH to GitHub/GitLab. If this...
Read more >Bootstrap Kubernetes the hard way on Vagrant on Local ...
This is how we are able to perform any administrative operations on Kubernetes cluster using kubectl utility. Results: $ ls admin.crt admin.csr admin.key....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was able to get headless testing running on Vagrant. Some issues I noticed while doing this:
VAGRANT
env variable has a tendency to disappear, causing the CHROME_BIN variable to get set to an incorrect value bysetup.sh
.xvfb-run
to the beginning of the karma command.Currently running into a problem with e2e tests where we’re missing the webdriver-manager and protractor, both of which can be install via NPM but it seems they’re getting missed somehow.
I’m also seeing the same problem binding to ports that @MAKOSCAFEE encountered.
We’re very close to being able to solve this once and for all, I think.
I’m not sure that we have many people still using Vagrant. I’m going to close this for now but if someone is reading this, is using Vagrant, and is running into this issue, please feel free to reopen.