I have a TeamCity project set up with two build configurations. One runs every three minutes, in a continuous manner. The other runs every hour, on the hour. These used to be one configuration, until I split out the continuous build. Both configurations have two build steps: the first to build the solution and the second to run unit tests with MsTest.
Before the split into two configurations, the MsTest build step ran all tests with the attribute [Category("Unit")]. The "additional command line parameters" value in the MsTest build step was "/category:unit". I created a new test attribute category -- "Integration" -- in order to split two types of tests between the two configurations. The hourly build configuration is intended to use the "additional command line parameters" value of "/category:integration".
Unfortunately, the hourly build configuration does not find any tests to run. It doesn't matter whether the command line parameters include "unit", "integration", or both ("unit|integration"). On the other hand, the continuous build finds and runs the tests corresponding to the category(ies) included in the command line parameters. The hourly build log includes the following output:
[14:48:07]Step 2/2: Test Solution Hourly (MSTest) (29s)
[14:48:07][Step 2/2] Starting: C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe #TeamCityImplicit
[14:48:07][Step 2/2] in directory: D:\TeamCity\buildAgent\work\23f125e3a59e551a
[14:48:11][Step 2/2] No assemblies, run configuration and test metadata were found
The two build configurations are identical in every way except build triggering. They use the default checkout and work directories, and the same build configuration parameter. The same work directory is created for both. There are no dependencies between them. They run on the same agent.
My question is: Why is the hourly configuration not finding the tests?