I have a project for which I am using Teamcity to automate deployment, and I would also like to automate testing.
It is an angular frontend, and we have some protractor tests.
I would like to run these tests as one of the steps in our build configuration.
I would like to have these tests run inside a docker container instead of the teamcity agent.
I am able to run other steps using docker containers, so I have teamcity and docker working as expected.
My main problem here is being able to run this within the docker container. I would like to have a container that would be able to run without having to rely on external containers, however it seems that the containers I have found and tried using rely on an external selenium instance. Either I am misunderstanding how this should run, or I would like a self contained container to run the tests and drop dead afterwards.
Bear in mind that these tests can be run locally in our development workstations, with selenium and protractor running locally. I would like to achieve the same through a docker container, without that container having to rely on an external selenium server instance.
I have tried the following docker containers:
When I try to run the tests, they both complain selenium server could not be found.
This is my protractor configuration file:
// conf.js
var spec_files = "tests/*.specs.js";
exports.config = {
framework: 'jasmine',
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: [spec_files],
multiCapabilities: [{
browserName: 'chrome'
}],
baseUrl: 'test',
restartBrowserBetweenTests: true
}
The baseUrl parameter is fed into protractor with the following command:
protractor conf.js --baseUrl="http://[Replaced with Environment domain name]:8080"
What am I missing here?