Reputation: 25
I want to run Testcafe E2E tests in teacity CI/CD server. Can someone please help me to understand how can we use testcafe/testcafe docker image in teamcity to run the tests?
Upvotes: 1
Views: 470
Reputation: 711
I recommend that you refer to the following topics where you can find information on how to make it work:
Here is an article that describes how to integrate TestCafe with TeamCity. Please also take a look at the following article: Use TestCafe Docker Image.
Feel free to contact us if you need assistance with combining these tools.
UPDATED:
TeamCity goes along with the Docker Wrapper extension for Command Line Build Step. It provides an easy way to run a custom script inside a docker container.
However, you need to take into account the following specifics:
/opt/testcafe/bin/testcafe-docker.sh
. The TeamCity wrapper overrides the entrypoint of the docker images and prevents execution of this script. It means that /opt/testcafe/bin/testcafe-docker.sh
should be used instead of testcafe
to run your test with Docker and TeamCity:/opt/testcafe/docker/testcafe-docker.sh chromium test/e2e/**/* -r teamcity
export TMPDIR=/tmp
Configured Build Step may look like:
This configuration implies that you are using TestCafe with TeamCity TestCafe reporter installed as local packages. Ensure that the node_modules directory with TestCafe and plugins is a subdirectory of the test project root directory. TeamCity Docker Wrapper will mount the working directory inside the container.
Upvotes: 3