Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Teamcity NUnit Tests - No assemblies found

I am trying to get TeamCity set up for a project. I want to run a scheduled build that includes a step where NUnit Tests are run.

My NUnit build step looks like this:

Runtime: NUnit-2.6.3 v4.0 MSIL
Run tests on: **/Tests/*.dll
Execute: If all previous steps finished successfully

But every time I run the build I get an error saying:

No assemblies were found.

Why is this happening and how can I fix it? Also, conceptually, this build step will happen BEFORE the project is actually built. But how will there be any Test DLLs (assemblies) unless the project is built in the first place?

like image 957
ritratt Avatar asked Jul 02 '14 15:07

ritratt


1 Answers

I would suggest that you build your projects before running tests. Most common way to achieve this is that you have separate configurations for building code and running tests.

Your build configuration would generate artefacts (containing assemblies most likely).

Test run configuration would extract this artefact package, via artefacts dependency, then in build step you run tests from specific assembly.

This is the most common approach and using this approach you do not have to worry about files in the files system. Teamcity's snapshot isolation and artefacts dependencies will take care of this (when properly configured)

If you need an example how to achieve this, let me know.

like image 152
Dejan Dakić Avatar answered Nov 07 '22 15:11

Dejan Dakić