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
problem testing e2e in docker image #114
Comments
I've not been able to get it working with Chromium. I use chrome locally as On 3 Jul 2016 23:40, "geoHeil" notifications@github.com wrote:
|
I updated the Dockerfile to use chrome https://gist.github.com/geoHeil/48cd94bf4d748fd8fd6d25de4c272157 but still keep getting this error. |
I can't build using that dockerfile, which is relies on files that exist on your system. In particular I'm getting:
But I can see plenty of steps later on in the file that should also fail. Have you looked at our travis.yml? |
Which steps are you referring to? They all do work. For the keys, you can use any random key. Currently, I try to use https://github.com/jciolek/docker-protractor-headless respectively http://tobyho.com/2015/01/09/headless-browser-testing-xvfb/ |
Sorry if I was unclear. I ran and got the following error:
I presume any steps referencing
Could you provide command(s) I can run to generate the docker image you refer to, or (preferably) make an image available that I can pull down.
I am unclear whether this means you have solved your problem or not? |
The problem is not solved yet. I will update the dockerfile for you late afternoon. Thanks a lot for the support. |
I updated the dockerfile here: https://gist.github.com/geoHeil/48cd94bf4d748fd8fd6d25de4c272157 |
Everything is owned by root so I can't run any tests:
what's the sudo password for jenkins / how can I connect as root? |
A bad quick- fix is to just remove the last |
Sorry, should have figured that one out. Lots going on. I'm with you now. Yeah I figure it's something to do with the xdisplay. Travis is headless and we do
before the tests (why I was referencing it before) |
@geoHeil how can I get root in this image? EDIT: rebuilding minus the last line as suggested. |
You can change the User in the dockerfile via |
Finally got it working, though not in your image at the moment. I'm running arch which has a ton of problems with google chrome on the standard kernel: ref jessfraz/dockerfiles#65 and has caused me no end of issues. I'm hoping the key is:
in package.json This is on my dev docker image:
|
Great. So far I only got it this problem: Client failed to connect to the D-BUS daemon and found this posting http://stackoverflow.com/questions/28495341/start-a-service-in-docker-container-failed-with-error-failed-to-get-d-bus-conne I will have a look at your solution. |
I'm not sure how much of a problem that is. Chrome stayed up for me. dbus seems pretty badly broken on your image. On my image I solved the error you mention by:
before running chrome.. tbh I don't think it's causing a problem |
could you post your image / dockerfile? |
Not in it's current state as it has my company's IP all over it. I ultimatley will be able to post one if necessary. Give me a minute I'm trying to get it running on yours. |
It works, modify your package.json: jenkins@f007b5e7eec4:~/clicker$ git diff package.json
diff --git a/package.json b/package.json
index 67f354a..065e5b0 100644
--- a/package.json
+++ b/package.json
@@ -61,7 +61,7 @@
"cordovaPlatforms": [],
"scripts": {
"build": "gulp --gulpfile test/gulpfile.ts --cwd ./ build-app",
- "e2e": "gulp --gulpfile test/gulpfile.ts --cwd ./ build-e2e && protractor test/protractor.c
+ "e2e": "gulp --gulpfile test/gulpfile.ts --cwd ./ build-e2e && xvfb-run protractor test/pro
"karma": "gulp --gulpfile test/gulpfile.ts --cwd ./ karma-debug",
"postinstall": "ionic state restore && typings install && webdriver-manager update && cp te
"start": "ionic serve", I also had to make the following change (adding the jenkins@f007b5e7eec4:/usr/bin$ diff /tmp/google-chrome google-chrome
74c74
< exec -a "$0" "$HERE/chrome" "$@"
---
> exec -a "$0" "$HERE/chrome" --no-sandbox "$@" This is arch specific though as I mention above, it shouldn't affect you as you seem to be on mac. |
Running on your image:
|
Wow thanks a lot. But still I do not quite get it working:
|
There's no need to update the webdriver it's done on install. If you make that change to package.json it should work fine, as it does I can send your image back to you tomorrow if it'll help you figure things On 6 Jul 2016 00:25, "geoHeil" notifications@github.com wrote:
|
I've added a little info and a reference to this issue on the e2e blog. |
Hi, I have problems running the e2e tests in the following docker image: https://gist.github.com/geoHeil/48cd94bf4d748fd8fd6d25de4c272157
Chrome seems to be unreachable, even though chromium is installed:
The text was updated successfully, but these errors were encountered: