Webdriver.io is something like nightwatch.js. It allows you to do the cross-platform testing with the provided test case. Nothing is special.
But, here is the deal - You can setup e2e test without spending your time figuring out what to install, what to run, where to save the test case. This is huge. I mean setting up the project is the notorious time vampire you can imagine.
https://github.com/blueimp/wdio Thankfully, @blueimp gave us the good docker image sets that help us to setup e2e test easily. But, Unfortunately, There is lack of "how to install" document so i've decided to leave some steps i've been through to save other people's time.
First of all. you need to clone the whole git repository in your local machine (or remote machine)
git clone https://github.com/blueimp/wdio.git ?some directory?
If you're behind the company's firewall, you're going to have some trouble to fire up the project. In this case, you need to mount your certificate directory to resolve the SSL issue.
add /etc/ssl/certs:/etc/ssl/certs:ro
to all docker-compose services.
The cerificate location may varies depends on the machine. Unfortunately, I don't know the case if the host machine is windows. I suggest you to use Vagrant
or VirtualBox
to manage this issue.
After that go to the src
directory, and find the Dockerfile
and replace pip install itsdangerous
to RUN python3 -m pip --trusted-host pypi.org --trusted-host files.pythonhosted.org install itsdangerous
to not have a headache.
Then voila! most of the certificate issues are gone.
run docker-compose run --rm wdio [wdio.conf.js]
to commence the test. The detailed information is in the repository.
Oh, don't forget to remove []
!. Apparently they're for displaying where to put the paramters.
DO NOT npm install
inside of the shared directory!!
It will not work and waste your time figuring out what's wrong. If npm install is not working at all, I suggest you to temporaily move the project to the non-shared directory and run the command to install the npm packages. After the installation, move the project back to the shared directory for ease of development.
The webdriver image does not have proper CJK charset, I suggest you to include the font in the site to not see some nasty tofu.