Running tests in docker container? Needs some special configuration?
Posted: Sat Mar 21, 2020 2:04 pm
by klodoma
I am playing around with your trial webdriver and I have noticed a problem.
I created a docker container where I want to run the tests but they fail if I run them in the a docker container.
If I run the tests on a unix host similar to the docker container all good.
I am getting preload errors "fail 1 - Preload of https://127.0.0.1:88/build/js/shared.js has failed". It seems like in the docker container something is going wrong. Some other times, some other errors are displayed. The errors are not consistent.
In both cases, the docker container is providing all the files for the tests. (port 88:88 is mapped).
Attached are screenshots from the 2 hosts(one is the main host, the other one is the docker container - this fails)
PS: I am playing around with siesta-5.3.2-trial. webdriver--version is in the screenshot for both host/docker
Any ideas?
Re: Running tests in docker container? Needs some special configuration?
Posted: Sun Mar 22, 2020 12:27 pm
by nickolay
Hi,
Hard to say, the preload failure indicates its a legitimate 404 error, detected by browser and reported by Siesta. Possibly a file is just missing? or some access directives in the webserver aren't correct?
Can you try reproducing this error with Siesta 5.3.1 ?
Re: Running tests in docker container? Needs some special configuration?
Hard to say, the preload failure indicates its a legitimate 404 error, detected by browser and reported by Siesta. Possibly a file is just missing? or some access directives in the webserver aren't correct?
Can you try reproducing this error with Siesta 5.3.1 ?
No files are missing. I thought so too initially. In the tests that pass (the webdriver is on the server(not in the docker)) but the rest is delivered by the docker container.
I didn't tested with 5.3.1. A few months ago when I tried the CI setup with docker it worked well (I think it was the 5.2.3, I have to check).
Another thing I have noticed is that ALWAYS the second preload file fails. So no matter how I order these, it's always the second file that fails.
Is there a way to debug the console.log of the browser? or even the network requests of the browser?
Re: Running tests in docker container? Needs some special configuration?
Posted: Wed Mar 25, 2020 11:10 am
by nickolay
Another thing I have noticed is that ALWAYS the second preload file fails. So no matter how I order these, it's always the second file that fails.
This sounds very weird, the order of preloads shouldn't matter of course.
Is there a way to debug the console.log of the browser? or even the network requests of the browser?
This is possible with puppeteer (if error is reproducible with puppeteer launcher). The puppeteer's `Page` event has various request/response related events, which can be logged I guess: https://devdocs.io/puppeteer/index#event-request
You will need to modify "bin/siesta-launcher-all.js" for that, search for:
Re: Running tests in docker container? Needs some special configuration?
Posted: Wed Mar 25, 2020 6:15 pm
by klodoma
My conclusion is that the issue is related to the webdriver, chrome version or something related to them. I've tried different options to run this, same result. Webdriver with chrome is failing in the docker container.
Re: Running tests in docker container? Needs some special configuration?