Selecting different change for different projects when using snapshot dependencies

Our current setup is like this (see picture): we have two separate projects in Git which are used together and we have tens of build configurations for testing them. Those test jobs have artifact and snapshot dependencies on Project 1 and Project 2. This works nicely: during the night the latest changes are verified and during the day developers can easily run single test suites on the TeamCity, either the latest of master or they can use Dependencies tab to select specific versions of Projects 1 and 2. 

However, now we'd like to introduce additional step before executing test suites. This would be preparing the test packages to ease the duplicate work done by all the test jobs. The easy way would be to add new "Test packages" build configuration which "Test suite"s would have snapshot and artifact dependency on. Moreover, this job would need to have snapshot and artifact dependency on Git projects 1 and 2 and test job would still need application from Git project 2.. This is not a problem apart from the usability point of view.

Now if we implement it this way user has no more way to test any combination of Git project 1 and 2 in test suites. Instead he needs to select test package build and build from the same chain for Project 2 in his Dependencies tab. Using Changes-tab does not work either because it will list changes from both Git project 1 and 2 in the same list so user cannot choose one version of Git project 1 and another version of Git project 2. This would be quite optimal if it worked, because then TeamCity could automatically trigger "Test packages" job with the needed dependencies before running the Test suite and user could just wait until everything is ready.. 

So the question would be, what are my alternatives currently? I can think of these:

1. User needs to manually build test packages with the needed dependencies of Git project 1 and Git project 2 prior to running Test suite, where he can then select correct build of test packages job in order to test versions of Git project 1 and 2 that he wants. This causes irritating extra step to workflow.

2. User will use changes tab, but he will lose the ability to select versions from e.g. different day. This option is sometimes useful to have, for example when Git project 1 breaks tests for long time, then one can still keep testing Git project 2 along with the older version of Git project 1. 

3. Remove snapshot dependency from Git project 2 -> Test packages. This way there is no guarantee that application in test suite matches the version with which the test packages were created which is also sub-optimal. 

Is there still some better alternatives?

 

 

0
1 comment

Hi,

 

I think the following could work:

-Move the VCS Trigger from Test suites, if any, to it.

-Instead of (just) snapshot dependency from test suites to test packages, add a finish build trigger to trigger all of them once Test packages is finished.

-Ask your users to run Test packages. That way they will be able to run a build with their dependencies of choice, that will still trigger all of the test suites you require.

 

Could you try that? Feel free to try it on a smaller scale first, instead of modifying absolutely everything, but if I'm understanding your scenario correctly, it should definitely work.

 

0

Please sign in to leave a comment.