Run tests on two different agents

Hi TeamCity peoples-

I am trying to run the same Tests project on two different build agents.

I have a project called "Tests" that is a snapshot dependency of my "Build" project.  This works great.  Each time there is a Build, I get a Test.

Right now, I run "Tests" on a build agent called "test-mojave" in my "Testing" pool

I just added another agent called "tests-catalina" to my "Testing" pool.  For each project "Build," I want to run on both "test-mojave" and "test-catalina."

I suppose I could set up a new project called "Tests (Mojave)" and "Tests (Catalina)" based on the same template, and make each a snapshot dependency of "Build," then associate each of these projects with different pools, but that seems clunky.  I suspect there's a more easy and obvious way that I'm overlooking.

Thanks,

-Dan

0
2 comments

Hi Dan,

 

It might seem clunky but it's the recommended way to go. You can use a build template to share the configuration between the two so you only need to modify one, but having two different build configurations for your setup would also allow you to see instantly which of the two has failed, in case only one of them does.

 

It's also possible to force the run of builds on specific agents, so you could always create a script that when triggered triggers manually a run of the same build on both agents, but that seems much clunkier.

 

Another possibility, if the build is only compatible with those agents, would be to trigger the build on all compatible agents, which some triggers (such as the schedule) or running a custom build allow for.

0

Thanks Denis for the reply.  It confirms that I shouldn't be hunting elsewhere, so that's very helpful. 

Hopefully, I can keep the test agents in the same Testing pool and use agent requirements to make sure they run on the appropriate machine.

0

Please sign in to leave a comment.