How can I run nunit tests from teamcity not using the teamcity nunit lancher

Current teamcity scenario. Server1 , agent1
Currently I am running nunit tests using teamcity nunit launcher from agent1. I am facing few problems with it.
First: I am running automation testing using watin which interacts with the desktop. when I am using teamcity launcher it pops up the screen of interactive services dialog. whereas I am running the build using agent1. What I am expecting it to directly display IE instead of going through some dialog.

Secondly: When I run tests locally with nunit, data is successfully saved in a textfile. Whereas If I try it from teamcity it wipes the whole file.

Is there any way I explicitly use nunit and give it a path to run from instead from nunit launcher.

3 comments
Comment actions Permalink

Hi

For the first question: starting from Windows Vista, services are isolated and cannot interact with user desktop. There are two options:

  1. Allow tests to run by agent service in background. To prevent dialog pop-ups, clear "Allow service to interact with desktop" option in agent service settings.
  2. Run the agent within user session by agent.bat.


Michael

0
Comment actions Permalink

Data file deletion can be caused by "Clean all files before build" option in version control settings. Anyway, if you need to save any data between builds, put it into %ProgramData% folder.

As alternative to native NUnit runner, you can start nunit-console.exe by command-line runner.

0
Comment actions Permalink

Please take a look to TeamCity addin for NUnit, this would allow you to have on-the-fly tests reporting when using NUnit-Console.exe
http://confluence.jetbrains.net/display/TCD6/TeamCity+Addin+for+NUnit

0

Please sign in to leave a comment.