Preventing ShadowCopy when using NUnit Launcher

Hi

I'm trying to create a build pipeline for running a long-runner server test process whereby I break the test run into phases that can be run in parallel on different agents to get quicker feedback.  The tests are coded as NUnit 2.5.3 tests using the .NET Framework 3.5 SP1.  Certain tests need to run before other tests and need to setup data in the DB before another test fixture can kick off.  I want to 'pass around' the test data between the different agents by using an artifact dependency on a backup created by a successful pre-requisite build.  The backup is made from within C# code and all works fine if I run the tests on my own local machine.  However, as soon as I slot the process into builds defined within TeamCity, I run into the problem that TC runs the tests in a shadow copied folder, i.e.

[22:16:31]:           [Run_T01_Inserting_Succeeds] Starting backup of OK52 to C:\BuildAgent\temp\buildTmp\nunit20\ShadowCopyCache\4220_634085217390820467\Tests_108789296\assembly\dl3\0b7c1342\37d8af61_fdeaca01\..\..\..\..\Sql\Rollout\OK52_Backup1.bak ...
[22:16:31]:           [Run_T01_Inserting_Succeeds] Backup of OK52 to C:\BuildAgent\temp\buildTmp\nunit20\ShadowCopyCache\4220_634085217390820467\Tests_108789296\assembly\dl3\0b7c1342\37d8af61_fdeaca01\..\..\..\..\Sql\Rollout\OK52_Backup1.bak completed in 637 ms


I am therefore unable to specify within the C# code the actual path to the DB backup. I know I can solve this using an absolute path, but I want to use relative paths for creating/restoring the backup into/from a specific folder.  Is there any way to solve this problem?

Thanks
Carel
3 comments

We run the tests using the MSBuild runner to fire off a MSBuild script.  Within the MSBuild script we use nunit-console to run the tests.  We are using the latest TC 5.1.1 release and running MSBuild 4 targeting the x86 platform.  We pick up on the results using the Import data from XML feature linked to the NUnit test result file created by nunit-console.

Thanks

0

I created an issue for this at

http://youtrack.jetbrains.net/issue/TW-12192

Please vote for it and comment it. Please attach a comment describing how have you tried to start unit tests with TeamCity test runner (Commandline, <NUnitTeamCity> task, ...)
Thanks!

0

Please sign in to leave a comment.