TeamCity build does not run new XUnit tests

Hi,
I'm using TeamCity 5 with Git VCS and Visual Studio 2010 SLN build runner.

My solution has a class library proj containing a number of XUnit 1.5 tests. The post build event on this project runs the tests $(SolutionDir)libs\XUnit-1.5\xunit.console.exe $(SolutionDir)MyTestProj\$(OutDir)\MyTestProj.dll

This works fine for running all my tests on my dev machine, and runs fine on the TeamCity build agent.

However, I recently added a new XUnit test function to this project, committed it to github, which was picked up by TeamCity and a build was run. But the new test was not included in the run.

It appears that the source is checked out to a different directory (e.g. c:\checkedoutsource) to my git repository (c:\my_source), and when the SLN build runner builds my solution, the post build event 'run tests' is targeting the c:\checkedoutsource\bin\debug\MyTestProj.dll and not c:\my_source\bin\debug\MyTestProj.dll



Anyone have any suggestions of how to get TeamCity to build my test project and run the post build event against the newly created test assembly?? (without writing mahoosive MSBuild script files).

i.e. is it possible to set visual studio variables such as $(SolutionDir) in the build runner?

Hope that made sense, thanks

1 comment

Please describe host do you start unit tests in more detail, and attach a peice of MSBuild script too. Have a look to the documentation pages on properties of a build configuration at http://confluence.jetbrains.net/display/TCD5/Properties+of+a+Build+Configuration

Does the build work from commandline on the build agents in the build checkout directory started under the same user account?

0

Please sign in to leave a comment.