Following the move to split the TeamMentor Brower automation tests into the UnitTests_WebAutomation repository, I just committed a bunch of git pushes (from here up to here) and customized a TeamCity project , so that TeamCity EC2 box will:
1) automatically pull both code and tests repositories (with git commits triggering the pull)
2) Build both solutions files:
3) Run the NUnit project (which contain the Selenium Unit Tests)
Now ....
There were a couple special extra steps/tricks required to make this work:
The git pulls are done into separate folders (see below the TeamCity Git 'checkout rules')
These use the special syntax: +:.=>/{Target folder}
This means that (In the EC2 server) each repository has it own folder
The agent that runs the tests is a desktop-based windows process (i.e. not the default TeamCity Service Agent)
This Desktop agent is is explicitly mapped to this project:
Here is how the Desktop Agent was started: (the screenshot below is from the EC2 server where TeamCity is installed)
The NUnit SetupFixtureAttribute is used to start and stop the webserver (note how there is a dependency on the TeamCity clone paths)
The code above will execute before all tests, and the code below will execute at the end
The actual local port is now set to a random value, which ensures that there are no hard-coded ports/paths in these UnitTests:
And finally here are Michael's Selenium tests, that (for example) test the Login sequence:
What is really cool about this is that the whole process is now triggered from Git pushes (including starting and stopping the local instance of Cassini)