Integrate Nunit with TeamCity problem.

I use nant as the build runner. and use the Nunit2 task to run the Nunit.

            <nunit2>
                <formatter type="Plain" />
                <test assemblyname="../bin/tests/forecast/Tests.dll" />
             </nunit2>

And the dependant assembly locates at different folder. As long as I copy all the dependant assemblies to the same folder as the Tests.dll. Everything works fine.

I an wondering  is that a way to specify the  dependant assembly  path that nunit2 task can load it that way. Like the "nunit-console.exe", we can create a nunit project which we can use the binpath property to specify the dependant assembly  path. For the Nunit2 task in Nnant ot nunit task in MSbuild. Can we specify the  dependant assembly  path?

I can run "nunit-console.exe" inside nant to run unit test. but TeamCity can not reports tests results on-the-fly.

Nunit works fine with the TeamCity. My problem is the dependant assemply. I don't want to copy all dependant assempliesto the test folder cause lots of test project depend on these assemblies.


Any suggestion?

0
29 comments

TeamCity does not support setting custom paths for assemblies lookup. But, to load AppDomain for NUnit tests it's tries to find <assembly name and extension>.config file to use for AppDomain. You may try creating those .config files for every assembly.

On the other hand you may consider unsing TeamCity addin for NUnit with nunit-console.exe. Could you please have a look to documentation page at
http://www.jetbrains.net/confluence/display/TCD4/TeamCity+Addin+for+NUnit

Thanks!

0

Thanks Eugene,

Can you give me a sample how to setup the custom paths for assemblies lookup?

0

For each test assembly create file called <assembly>.dll.config or <assembly>.exe.config.
Please have a look to .NET documentation on how to create that config file:
http://msdn.microsoft.com/en-us/library/823z9h8w.aspx

Thanks!

0

this one won't work.

I have a folder structure like this

c:\application\bin   --  libs
                           --  test

the dll at the test folder need to referenced to the dlls at libs folder.

If I use the config file. the privatePath has to be the subFolder of the ApplicationBase. But the Nunit2 task can not specify the ApplicationBase and the default ApplicationBase is the test folder. It means that I can only reference to the dlls under the test's sub folder.

So I try the TeamCity addin for NUnit with nunit-console.exe by follow the instruction here http://www.jetbrains.net/confluence/display/TCD4/TeamCity+Addin+for+NUnit

copy the C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.TeamCity.NUnitAddin-NUnit-2.4.8.* to the "addins" folder under the Nunit( I use Nunit 2.4.8.0). It did work yesterday. I get the test result on-the-fly. I check the build log and everything seems working. I try to run the nunit-console.exe   Command  line and did see that NUnit try to connect to the teamCity serve ( failed to connect the teamcity because I run it by myself instead of the agent and that make sence).

But today, I try to run it again  and I can't get test result on-the-fly ( no Test tab show up). I check the build log and all the unit test run sucessfully. It looks like the addins doesn't work. I try to run the nunit-console.exe   Command  line again and didn't  see that NUnit try to connect to the teamCity serve. Just like without addins.

I also update the teamcity to the latest 4.5 and no luck.  I just don't understand why it works yesterday but not today.

What else  can I do?

Thanks a lot!

0

apparently, Nunit won't pick up the addins.

in the build log, I  see this again when I can get the on-the-fly report..

[16:59:20]: [exec]      [exec] NUnit version 2.4.8
[16:59:20]: [exec]      [exec] Copyright (C) 2002-2007 Charlie Poole.
[16:59:20]: [exec]      [exec] Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
[16:59:20]: [exec]      [exec] Copyright (C) 2000-2002 Philip Craig.
[16:59:20]: [exec]      [exec] All Rights Reserved.
[16:59:20]: [exec]      [exec]
[16:59:20]: [exec]      [exec] Runtime Environment -
[16:59:20]: [exec]      [exec]    OS Version: Microsoft Windows NT 5.1.2600 Service Pack 3
[16:59:20]: [exec]      [exec]   CLR Version: 2.0.50727.3082 ( Net 2.0.50727.3082 )
[16:59:20]: [exec]      [exec]
[16:59:21]: [exec]      [exec] TeamCity addin initializing...
[16:59:22]: [exec]      [exec] TeamCity addin loaded
[16:59:22]: [exec]      [exec] TeamCity addin installed
[17:00:11]: [exec]      [exec] .
[17:00:11]: [exec]      [exec] Tests run: 1, Failures: 0, Not run: 0, Time: 48.453 seconds
[17:00:11]: [exec]      [exec]
[17:00:11]: [exec]      [exec]
[17:00:12]: [exec] BUILD SUCCEEDED - 0 non-fatal error(s), 3 warning(s)
[17:00:12]: [exec] Total time: 52.7 seconds.

Now All I see are:


[15:25:20]: [exec]      [exec] NUnit version 2.4.8
[15:25:20]: [exec]      [exec] Copyright (C) 2002-2007 Charlie Poole.
[15:25:20]: [exec]      [exec] Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
[15:25:20]: [exec]      [exec] Copyright (C) 2000-2002 Philip Craig.
[15:25:20]: [exec]      [exec] All Rights Reserved.
[15:25:20]: [exec]      [exec] Runtime Environment -
[15:25:20]: [exec]      [exec]    OS Version: Microsoft Windows NT 5.1.2600 Service Pack 3
[15:25:20]: [exec]      [exec]   CLR Version: 2.0.50727.3082 ( Net 2.0.50727.3082 )
[15:26:11]: [exec]      [exec] .
[15:26:11]: [exec]      [exec] Tests run: 1, Failures: 0, Not run: 0, Time: 50.000 seconds
[15:26:12]: [exec] BUILD SUCCEEDED
[15:26:12]: [exec] Total time: 52.4 seconds.


I did copy the  JetBrains.TeamCity.NUnitAddin-NUnit-2.4.8.dll and JetBrains.TeamCity.NUnitAddin-NUnit-2.4.8.pdb to the "bin" and "addins" folder.( addins folder is the sub folder of bin). I also update the  nunit-console.exe.config.


<configuration>

  <runtime>
     ........

    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <probing privatePath="addins"/>
    </assemblyBinding>

     ........
  </runtime>
 
</configuration>

 
I don't know why I can not get on-the-fly report.






0

more information.

1. I confirmed the NUint load the addin  by checking the  c:NUnitPrimaryTrace.txt. I did see this log.

NUnit-console.exe terminating
NUnit-console.exe starting
Added SettingsService
Added DomainManager
Added AddinRegistry
Added AddinManager
Initializing SettingsService
Initializing DomainManager
Initializing AddinRegistry
Initializing AddinManager
Request for service IAddinRegistry satisfied by AddinRegistry
Loaded nunit.core.extensions.dll
Registered addin: RepeatedTestDecorator
Registered addin: Row Test Extension
Loaded JetBrains.TeamCity.NUnitAddin-NUnit-2.4.8.dll
Registered addin: Teamcity Listener
Request for service DomainManager satisfied by DomainManager


2. I run the agent with my account ( member of local Admin).

3. I created "teamcity-log4net.xml" and let it sit side by side with the JetBrains.TeamCity.NUnitAddin-NUnit-2.4.8.dll ( under the addins folder). But I can't get any log file from "C:\BuildAgent\temp\buildTmp" and any subfolders.

4. I run the "cmd /c set" before I tun the Nunit. and the follwoing are missing comparing to the link http://www.jetbrains.net/devnet/thread/278257.: ( I update to the Teamcity 4.5 already)

teamcity-dotnet-log-file=C:\BuildAgent\temp\buildTmp\TeamCity.NET\.net.2008-11-07T09-45-16.#2712-238225866114545.log
09:45:21: TeamCity.Agent.NET.root.cdc51fb1-1a81-4792-8831-3a5a69c3af76=C:\BuildAgent\plugins\dotnetPlugin\bin
09:45:21: TeamCity.AgentUrl.cdc51fb1-1a81-4792-8831-3a5a69c3af76=http://localhost:9090/RPC2
09:45:21: teamcity.build.properties.file=C:\BuildAgent\temp\agentTmp\teamcity.build55694.properties
09:45:21: TeamCity.BuildId.cdc51fb1-1a81-4792-8831-3a5a69c3af76=39
09:45:21: teamcity.dotnet.coveragelauncher=C:\BuildAgent\plugins\dotnetPlugin\bin\TeamCityRunners\JetBrains.dotTrace.TeamCity.CoverageRunner.exe
09:45:21: teamcity.dotnet.nunitaddin=C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.TeamCity.NUnitAddin-NUnit
09:45:21: teamcity.dotnet.nunitlauncher=C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe
09:45:21: teamcity.dotnet.nunitlauncher.msbuild.task=C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.MSBuildLoggers.dll
09:45:21: teamcity.dotnet.nunitlauncher1.1=C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher1.1.exe
09:45:21: teamcity.dotnet.nunitlauncher2.0=C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher2.0.exe
09:45:21: teamcity.dotnet.nunitlauncher2.0.vsts=C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher2.0.VSTS.exe
09:45:21: teamcity.dotnet.platform=C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.TeamCity.PlatformProcessRunner.1.1.exe

5. I also disable the firewall and anti-virus.

6. I run a bat file from the nant. the bat file call "nunit-console.exe" to run a nunit project. everything seems working except the on-the-fly ouyput.


Any suggestion? Don't give up on me.

0

a ittle bit more.

I have anothe test assembly that have no dependences. So I use "Nunit2" task torun the NUnit and I get the on-the-fly  report. It means that the teamCity server side is OK. But my other test assemblies has lots of dependencies  that locate at other folders that I  have to use a nunit project to load all these dependencies. 'Nunit2" task doesn't support nunit project. It seems addin is my only way to get the test running.

So, It seems Nunit load the addins but not load it correctly.

0

Thanks. Could you please try running NUnit-Console.exe for a .dll file, not a project to check weather TeamCity Addin for NUnit works.

0

No. .dll filedidn't work either. everything seems working, only  on-the-fly report is missing. I try running at different agents and no luck.

0

Here is the script for the test:

      <!-- Running NUnit test -->
    <target name="copyNUnitAddins">
        <mkdir dir="build/Nunit/bin/addins" />
        <copy todir="build/Nunit/bin/addins" flatten ="true" >
            <fileset basedir="/">
                <include name="${teamcity.dotnet.nunitaddin}-2.4.8.*" />
            </fileset>
        </copy>
    </target>

    <target name="runOneUnitTest">
        <if test="${property::exists('RUN_UNIT_TEST')}">
            <echo message="Running One NUnit test" />
            <exec program="nunit-console.exe"
            basedir="build/NUnit/bin"
            workingdir="bin"
            commandline="tests\core\abc.Common.Collections.Tests\abc.Common.Collections.Tests.dll" />
         </if>
    </target>

Here is part of the build log output

[09:16:25]: copyNUnitAddins
[09:16:25]: [copyNUnitAddins] mkdir
[09:16:26]: [copyNUnitAddins] copy
[09:16:26]: runOneUnitTest (3s)
[09:16:26]: [runOneUnitTest] if
[09:16:26]: [runOneUnitTest] Running One NUnit test
[09:16:26]: [runOneUnitTest] exec (3s)
[09:16:26]: [exec] Starting 'C:\BuildAgent\work\1a1684fd77594381\build\NUnit\bin\nunit-console.exe (tests\core\abc.Common.Collections.Tests\abc.Common.Collections.Tests.dll)' in 'C:\BuildAgent\work\1a1684fd77594381\bin'
[09:16:26]: [exec] NUnit version 2.4.8
[09:16:26]: [exec] Copyright (C) 2002-2007 Charlie Poole.
[09:16:26]: [exec] Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
[09:16:26]: [exec] Copyright (C) 2000-2002 Philip Craig.
[09:16:26]: [exec] All Rights Reserved.
[09:16:26]: [exec] Runtime Environment -
[09:16:26]: [exec]    OS Version: Microsoft Windows NT 5.1.2600 Service Pack 3
[09:16:26]: [exec]   CLR Version: 2.0.50727.3082 ( Net 2.0.50727.3082 )
[09:16:28]: [exec] .........................................
[09:16:29]: [exec] Tests run: 41, Failures: 0, Not run: 0, Time: 1.234 seconds
0

Could you please dump all environment variables before running NUnit tests. TeamCity uses environment variables to provide necessary logging settings for NUnit runner and NUnit addin.

Do you change environment variables for NUnit-Console.exe process?

Check version of NUnit is the same as version of TeamCity addin for NUnit

Do you copy TeamCity addin for NUnit on every build?

Please add dump of the files from <nunit>, <nunit>/bin, <nunit>/bin/addins

Does adding 'plugins' folder helps?


Thanks!

0

Please try removing the line '     workingdir="bin"'

0

Add
  <exec program="cmd.exe" >
     <arg value="dir" />
     <arg path="build/nunit" />
     <arg value="/s" />
  </exec>

What is the output?

0

because "tests\core\abc.Common.Collections.Tests\abc.Common.Collections.Tests.dll" under the bin directory. If I remove the 'workingdir="bin"'', I have to change to

commandline="bin\tests\core\abc.Common.Collections.Tests\abc.Common.Collections.Tests.dll" />


I try this and it doesn't work.

Add
  <exec program="cmd.exe" >
     <arg value="dir" />
     <arg path="build/nunit" />
     <arg value="/s" />
  </exec>

here is the output:
Volume in drive C has no label.
Volume Serial Number is E8D5-39BD

Directory of C:\Aclaro\4.5.0\build\NUnit

04/28/2009  09:35 AM    <DIR>          .
04/28/2009  09:35 AM    <DIR>          ..
04/27/2009  09:37 AM    <DIR>          bin
04/22/2009  04:28 PM           256,158 Coverage.Log
04/22/2009  03:57 PM            18,347 fit-license.txt
04/22/2009  03:57 PM             1,131 license.txt
04/22/2009  03:57 PM             1,078 Logo.ico
04/28/2009  09:35 AM             2,962 nunit-test.build
04/27/2009  08:56 AM             2,980 nunit-test.build.bak
04/27/2009  05:40 PM             2,240 nunit-utility.build
04/27/2009  05:32 PM             1,911 nunit-utility.build.bak
04/22/2009  03:57 PM             1,082 rowtest-license.txt
04/27/2009  05:02 PM               174 run-nunit-cmdline.bat
04/27/2009  01:28 PM               177 run-nunit-cmdline.bat.bak
04/22/2009  03:57 PM               195 run-nunit-coverage.bat
04/22/2009  03:57 PM               178 run-nunit-gui.bat
04/22/2009  04:28 PM             3,357 TestResult.xml
              14 File(s)        291,970 bytes

Directory of C:\Aclaro\4.5.0\build\NUnit\.svn

04/28/2009  09:36 AM             1,545 entries
04/22/2009  03:57 PM                 2 format
04/22/2009  03:57 PM    <DIR>          prop-base
04/22/2009  03:57 PM    <DIR>          props
04/28/2009  09:36 AM    <DIR>          text-base
04/28/2009  09:36 AM    <DIR>          tmp
               2 File(s)          1,547 bytes

Directory of C:\Aclaro\4.5.0\build\NUnit\.svn\prop-base

04/22/2009  03:57 PM    <DIR>          .
04/22/2009  03:57 PM    <DIR>          ..
04/22/2009  03:57 PM                53 Logo.ico.svn-base
               1 File(s)             53 bytes

Directory of C:\Aclaro\4.5.0\build\NUnit\.svn\props

04/22/2009  03:57 PM    <DIR>          .
04/22/2009  03:57 PM    <DIR>          ..
               0 File(s)              0 bytes

Directory of C:\Aclaro\4.5.0\build\NUnit\.svn\text-base

04/28/2009  09:36 AM    <DIR>          .
04/28/2009  09:36 AM    <DIR>          ..
04/22/2009  03:57 PM            18,347 fit-license.txt.svn-base
04/22/2009  03:57 PM             1,131 license.txt.svn-base
04/22/2009  03:57 PM             1,078 Logo.ico.svn-base
04/28/2009  09:35 AM             2,962 nunit-test.build.svn-base
04/27/2009  05:40 PM             2,240 nunit-utility.build.svn-base
04/22/2009  03:57 PM             1,082 rowtest-license.txt.svn-base
04/27/2009  05:02 PM               174 run-nunit-cmdline.bat.svn-base
04/22/2009  03:57 PM               195 run-nunit-coverage.bat.svn-base
04/22/2009  03:57 PM               178 run-nunit-gui.bat.svn-base
               9 File(s)         27,387 bytes

Directory of C:\Aclaro\4.5.0\build\NUnit\.svn\tmp

04/28/2009  09:36 AM    <DIR>          .
04/28/2009  09:36 AM    <DIR>          ..
04/22/2009  03:57 PM    <DIR>          prop-base
04/22/2009  03:57 PM    <DIR>          props
04/28/2009  09:36 AM    <DIR>          text-base
               0 File(s)              0 bytes

Directory of C:\Aclaro\4.5.0\build\NUnit\.svn\tmp\prop-base

04/22/2009  03:57 PM    <DIR>          .
04/22/2009  03:57 PM    <DIR>          ..
               0 File(s)              0 bytes

Directory of C:\Aclaro\4.5.0\build\NUnit\.svn\tmp\props

04/22/2009  03:57 PM    <DIR>          .
04/22/2009  03:57 PM    <DIR>          ..
               0 File(s)              0 bytes

Directory of C:\Aclaro\4.5.0\build\NUnit\.svn\tmp\text-base

04/28/2009  09:36 AM    <DIR>          .
04/28/2009  09:36 AM    <DIR>          ..
               0 File(s)              0 bytes

Directory of C:\Aclaro\4.5.0\build\NUnit\bin

04/27/2009  09:37 AM    <DIR>          .
04/27/2009  09:37 AM    <DIR>          ..
04/24/2009  02:01 PM    <DIR>          addins
12/16/2005  09:59 PM             2,959 clr.bat
03/19/2006  08:19 AM               808 Failure.jpg
02/04/2007  09:42 AM            49,152 fit.dll
04/24/2009  11:20 AM    <DIR>          framework
03/19/2006  08:19 AM               689 Gray.jpg
03/19/2006  08:19 AM               789 Ignored.jpg
04/24/2009  12:02 PM         1,232,896 JetBrains.TeamCity.NUnitAddin-NUnit-2.4.8.dll
04/24/2009  12:02 PM            28,160 JetBrains.TeamCity.NUnitAddin-NUnit-2.4.8.pdb
04/24/2009  11:48 AM            40,960 loadtest-assembly.dll
10/31/2007  11:50 PM           258,048 log4net.dll
04/24/2009  11:48 AM             6,656 mock-assembly.dll
04/24/2009  11:48 AM             4,608 nonamespace-assembly.dll
04/24/2009  11:48 AM             4,096 notestfixtures-assembly.dll
04/24/2009  11:48 AM            19,968 nunit-console-runner.dll
04/24/2009  11:48 AM             4,608 nunit-console-x86.exe
04/24/2009  11:48 AM             3,983 nunit-console-x86.exe.config
04/24/2009  11:48 AM             4,608 nunit-console.exe
04/27/2009  09:37 AM             4,104 nunit-console.exe.config
04/24/2009  11:48 AM             4,102 nunit-console.exe.config.bak
04/24/2009  11:48 AM            24,576 nunit-console.tests.dll
04/24/2009  11:48 AM           245,760 nunit-gui-runner.dll
04/24/2009  11:48 AM             8,704 nunit-gui.tests.dll
04/24/2009  11:48 AM             5,632 nunit-x86.exe
04/24/2009  11:48 AM             4,156 nunit-x86.exe.config
04/24/2009  11:48 AM            90,112 nunit.core.dll
04/24/2009  11:48 AM            11,264 nunit.core.extensions.dll
04/24/2009  11:48 AM            40,960 nunit.core.interfaces.dll
04/24/2009  11:48 AM           118,784 nunit.core.tests.dll
04/24/2009  11:48 AM             5,632 nunit.exe
04/24/2009  11:48 AM             4,156 nunit.exe.config
04/24/2009  11:48 AM            36,864 nunit.extensions.tests.dll
04/24/2009  11:48 AM             9,728 nunit.fixtures.dll
04/24/2009  11:48 AM             8,192 nunit.fixtures.tests.dll
04/24/2009  11:48 AM            77,824 nunit.framework.dll
04/24/2009  11:48 AM             6,144 nunit.framework.extensions.dll
04/24/2009  11:48 AM           270,336 nunit.framework.tests.dll
04/24/2009  11:48 AM           310,165 nunit.framework.xml
04/24/2009  11:48 AM            10,752 nunit.mocks.dll
04/24/2009  11:48 AM            13,824 nunit.mocks.tests.dll
04/06/2009  08:37 PM            86,016 nunit.uiexception.dll
04/24/2009  11:48 AM           278,528 nunit.uikit.dll
04/24/2009  11:48 AM            40,960 nunit.uikit.tests.dll
04/24/2009  11:48 AM           114,688 nunit.util.dll
04/24/2009  11:48 AM           176,128 nunit.util.tests.dll
03/16/2007  04:53 AM             6,297 NUnitFitTests.html
04/24/2009  11:48 AM             3,437 NUnitTests.config
04/24/2009  11:48 AM               553 NUnitTests.nunit
02/04/2007  09:42 AM             3,072 runFile.exe
02/10/2007  06:53 AM             1,794 runFile.exe.config
03/19/2006  08:19 AM               768 Success.jpg
04/24/2009  11:48 AM            36,864 test-assembly.dll
04/24/2009  11:48 AM            12,288 test-utilities.dll
04/24/2009  03:18 PM            11,185 TestResult.xml
04/24/2009  11:20 AM    <DIR>          tests
04/24/2009  11:48 AM             6,144 timing-tests.dll
              53 File(s)      3,753,481 bytes

Directory of C:\Aclaro\4.5.0\build\NUnit\bin\.svn

04/27/2009  09:47 AM             6,627 entries
04/22/2009  03:57 PM                 2 format
04/22/2009  03:57 PM    <DIR>          prop-base
04/22/2009  03:57 PM    <DIR>          props
04/27/2009  09:47 AM    <DIR>          text-base
04/27/2009  09:47 AM    <DIR>          tmp
               2 File(s)          6,629 bytes

Directory of C:\Aclaro\4.5.0\build\NUnit\bin\.svn\prop-base

04/22/2009  03:57 PM    <DIR>          .
04/22/2009  03:57 PM    <DIR>          ..
04/22/2009  03:57 PM                53 Failure.jpg.svn-base
04/22/2009  03:57 PM                53 fit.dll.svn-base
04/22/2009  03:57 PM                53 Ignored.jpg.svn-base
04/22/2009  03:57 PM                53 loadtest-assembly.dll.svn-base
04/22/2009  03:57 PM                53 mock-assembly.dll.svn-base
04/22/2009  03:57 PM                53 nonamespace-assembly.dll.svn-base
04/22/2009  03:57 PM                53 notestfixtures-assembly.dll.svn-base
04/22/2009  03:57 PM                53 nunit-console-runner.dll.svn-base
04/22/2009  03:57 PM                53 nunit-console-x86.exe.svn-base
04/22/2009  03:57 PM                53 nunit-console.exe.svn-base
04/22/2009  03:57 PM                53 nunit-console.tests.dll.svn-base
04/22/2009  03:57 PM                53 nunit-gui-runner.dll.svn-base
04/22/2009  03:57 PM                53 nunit-gui.tests.dll.svn-base
04/22/2009  03:57 PM                53 nunit-x86.exe.svn-base
04/22/2009  03:57 PM                53 nunit.core.dll.svn-base
04/22/2009  03:57 PM                53 nunit.core.extensions.dll.svn-base
04/22/2009  03:57 PM                53 nunit.core.interfaces.dll.svn-base
04/22/2009  03:57 PM                53 nunit.core.tests.dll.svn-base
04/22/2009  03:57 PM                53 nunit.exe.svn-base
04/22/2009  03:57 PM                53 nunit.extensions.tests.dll.svn-base
04/22/2009  03:57 PM                53 nunit.fixtures.dll.svn-base
04/22/2009  03:57 PM                53 nunit.fixtures.tests.dll.svn-base
04/22/2009  03:57 PM                53 nunit.framework.dll.svn-base
04/22/2009  03:57 PM                53 nunit.framework.extensions.dll.svn-base
04/22/2009  03:57 PM                53 nunit.framework.tests.dll.svn-base
04/22/2009  03:57 PM                53 nunit.mocks.dll.svn-base
04/22/2009  03:57 PM                53 nunit.mocks.tests.dll.svn-base
04/22/2009  03:57 PM                53 nunit.uikit.dll.svn-base
04/22/2009  03:57 PM                53 nunit.uikit.tests.dll.svn-base
04/22/2009  03:57 PM                53 nunit.util.dll.svn-base
04/22/2009  03:57 PM                53 nunit.util.tests.dll.svn-base
04/22/2009  03:57 PM                53 runFile.exe.svn-base
04/22/2009  03:57 PM                53 Success.jpg.svn-base
04/22/2009  03:57 PM                53 test-assembly.dll.svn-base
04/22/2009  03:57 PM                53 test-utilities.dll.svn-base
04/22/2009  03:57 PM                53 timing-tests.dll.svn-base
              36 File(s)          1,908 bytes

Directory of C:\Aclaro\4.5.0\build\NUnit\bin\.svn\props

04/22/2009  03:57 PM    <DIR>          .
04/22/2009  03:57 PM    <DIR>          ..
               0 File(s)              0 bytes

Directory of C:\Aclaro\4.5.0\build\NUnit\bin\.svn\text-base

04/27/2009  09:47 AM    <DIR>          .
04/27/2009  09:47 AM    <DIR>          ..
04/22/2009  03:57 PM             2,959 clr.bat.svn-base
04/22/2009  03:57 PM               808 Failure.jpg.svn-base
04/22/2009  03:57 PM            49,152 fit.dll.svn-base
04/22/2009  03:57 PM               789 Ignored.jpg.svn-base
04/22/2009  03:57 PM            40,960 loadtest-assembly.dll.svn-base
04/22/2009  03:57 PM             6,656 mock-assembly.dll.svn-base
04/22/2009  03:57 PM             4,608 nonamespace-assembly.dll.svn-base
04/22/2009  03:57 PM             4,096 notestfixtures-assembly.dll.svn-base
04/22/2009  03:57 PM            19,968 nunit-console-runner.dll.svn-base
04/22/2009  03:57 PM             3,983 nunit-console-x86.exe.config.svn-base
04/22/2009  03:57 PM             4,608 nunit-console-x86.exe.svn-base
04/27/2009  09:37 AM             4,104 nunit-console.exe.config.svn-base
04/22/2009  03:57 PM             4,608 nunit-console.exe.svn-base
04/22/2009  03:57 PM            24,576 nunit-console.tests.dll.svn-base
04/22/2009  03:57 PM           245,760 nunit-gui-runner.dll.svn-base
04/22/2009  03:57 PM             8,704 nunit-gui.tests.dll.svn-base
04/22/2009  03:57 PM             4,156 nunit-x86.exe.config.svn-base
04/22/2009  03:57 PM             5,632 nunit-x86.exe.svn-base
04/22/2009  03:57 PM            90,112 nunit.core.dll.svn-base
04/22/2009  03:57 PM            11,264 nunit.core.extensions.dll.svn-base
04/22/2009  03:57 PM            40,960 nunit.core.interfaces.dll.svn-base
04/22/2009  03:57 PM           118,784 nunit.core.tests.dll.svn-base
04/22/2009  03:57 PM             4,156 nunit.exe.config.svn-base
04/22/2009  03:57 PM             5,632 nunit.exe.svn-base
04/22/2009  03:57 PM            36,864 nunit.extensions.tests.dll.svn-base
04/22/2009  03:57 PM             9,728 nunit.fixtures.dll.svn-base
04/22/2009  03:57 PM             8,192 nunit.fixtures.tests.dll.svn-base
04/22/2009  03:57 PM            77,824 nunit.framework.dll.svn-base
04/22/2009  03:57 PM             6,144 nunit.framework.extensions.dll.svn-base
04/22/2009  03:57 PM           270,336 nunit.framework.tests.dll.svn-base
04/22/2009  03:57 PM           310,165 nunit.framework.xml.svn-base
04/22/2009  03:57 PM            10,752 nunit.mocks.dll.svn-base
04/22/2009  03:57 PM            13,824 nunit.mocks.tests.dll.svn-base
04/22/2009  03:57 PM           278,528 nunit.uikit.dll.svn-base
04/22/2009  03:57 PM            40,960 nunit.uikit.tests.dll.svn-base
04/22/2009  03:57 PM           114,688 nunit.util.dll.svn-base
04/22/2009  03:57 PM           176,128 nunit.util.tests.dll.svn-base
04/22/2009  03:57 PM             6,297 NUnitFitTests.html.svn-base
04/22/2009  03:57 PM             3,437 NUnitTests.config.svn-base
04/22/2009  03:57 PM               553 NUnitTests.nunit.svn-base
04/22/2009  03:57 PM             1,794 runFile.exe.config.svn-base
04/22/2009  03:57 PM             3,072 runFile.exe.svn-base
04/22/2009  03:57 PM               768 Success.jpg.svn-base
04/22/2009  03:57 PM            36,864 test-assembly.dll.svn-base
04/22/2009  03:57 PM            12,288 test-utilities.dll.svn-base
04/22/2009  03:57 PM             6,144 timing-tests.dll.svn-base
              46 File(s)      2,132,385 bytes

Directory of C:\Aclaro\4.5.0\build\NUnit\bin\.svn\tmp

04/27/2009  09:47 AM    <DIR>          .
04/27/2009  09:47 AM    <DIR>          ..
04/22/2009  03:57 PM    <DIR>          prop-base
04/22/2009  03:57 PM    <DIR>          props
04/27/2009  09:47 AM    <DIR>          text-base
               0 File(s)              0 bytes

Directory of C:\Aclaro\4.5.0\build\NUnit\bin\.svn\tmp\prop-base

04/22/2009  03:57 PM    <DIR>          .
04/22/2009  03:57 PM    <DIR>          ..
               0 File(s)              0 bytes

Directory of C:\Aclaro\4.5.0\build\NUnit\bin\.svn\tmp\props

04/22/2009  03:57 PM    <DIR>          .
04/22/2009  03:57 PM    <DIR>          ..
               0 File(s)              0 bytes

Directory of C:\Aclaro\4.5.0\build\NUnit\bin\.svn\tmp\text-base

04/27/2009  09:47 AM    <DIR>          .
04/27/2009  09:47 AM    <DIR>          ..
               0 File(s)              0 bytes

Directory of C:\Aclaro\4.5.0\build\NUnit\bin\addins

04/24/2009  02:01 PM    <DIR>          .
04/24/2009  02:01 PM    <DIR>          ..
04/24/2009  12:02 PM         1,232,896 JetBrains.TeamCity.NUnitAddin-NUnit-2.4.8.dll
04/24/2009  12:02 PM            28,160 JetBrains.TeamCity.NUnitAddin-NUnit-2.4.8.pdb
               2 File(s)      1,261,056 bytes

Directory of C:\Aclaro\4.5.0\build\NUnit\bin\framework

04/24/2009  11:20 AM    <DIR>          .
04/24/2009  11:20 AM    <DIR>          ..
04/06/2009  08:36 PM           126,976 nunit.framework.dll
04/06/2009  08:36 PM           503,147 nunit.framework.xml
04/06/2009  08:36 PM            20,480 nunit.mocks.dll
04/06/2009  08:36 PM             7,168 pnunit.framework.dll
04/06/2009  08:36 PM               141 pnunit.framework.xml
               5 File(s)        657,912 bytes

Directory of C:\Aclaro\4.5.0\build\NUnit\bin\tests

04/24/2009  11:20 AM    <DIR>          .
04/24/2009  11:20 AM    <DIR>          ..
04/06/2009  08:36 PM            40,960 loadtest-assembly.dll
04/06/2009  08:36 PM             7,680 mock-assembly.dll
04/06/2009  08:36 PM             4,608 nonamespace-assembly.dll
04/06/2009  08:36 PM            24,576 nunit-console.tests.dll
04/06/2009  08:37 PM             8,704 nunit-gui.tests.dll
04/06/2009  08:36 PM           155,648 nunit.core.tests.dll
04/06/2009  08:36 PM             8,192 nunit.fixtures.tests.dll
04/06/2009  08:36 PM           126,976 nunit.framework.dll
04/06/2009  08:36 PM           327,680 nunit.framework.tests.dll
04/06/2009  08:36 PM            24,576 nunit.mocks.tests.dll
04/06/2009  08:37 PM           126,976 nunit.uiexception.tests.dll
04/06/2009  08:37 PM            36,864 nunit.uikit.tests.dll
04/06/2009  08:36 PM           172,032 nunit.util.tests.dll
04/06/2009  08:36 PM             4,608 pnunit.tests.dll
04/06/2009  08:36 PM            45,056 test-assembly.dll
04/06/2009  08:36 PM            24,576 test-utilities.dll
04/06/2009  08:36 PM             6,656 timing-tests.dll
              17 File(s)      1,146,368 bytes

     Total Files Listed:
             187 File(s)      9,280,696 bytes
              56 Dir(s)  97,418,665,984 bytes free



Here is the script to dump all environment variables before running NUnit tests.
        <exec program="cmd.exe" commandline="/c set"/>   
        <echo message="teamcity.build.properties.file:${teamcity.build.properties.file}" />
        <echo message="teamcity.dotnet.nunitaddin:${teamcity.dotnet.nunitaddin}" />
        <echo message="teamcity.dotnet.nunitlauncher:${teamcity.dotnet.nunitlauncher}" />
        <echo message="teamcity.dotnet.nunitlauncher.msbuild.task:${teamcity.dotnet.nunitlauncher.msbuild.task}" />
        <echo message="teamcity.dotnet.nunitlauncher1.1:${teamcity.dotnet.nunitlauncher1.1}" />
        <echo message="teamcity.dotnet.nunitlauncher2.0:${teamcity.dotnet.nunitlauncher2.0}" />
        <echo message="teamcity.dotnet.nunitlauncher2.0.vsts:${teamcity.dotnet.nunitlauncher2.0.vsts}" />
        <echo message="teamcity.dotnet.platform:${teamcity.dotnet.platform}" />

And the ouput is:

[09:49:53]: [exec] Starting 'cmd.exe (/c set)' in 'C:\BuildAgent\work\1e6d7e0dcbc08afc\'
[09:49:53]: [exec] ALLUSERSPROFILE=C:\Documents and Settings\All Users
[09:49:53]: [exec] ANT_HOME=C:\apache-ant-1.7.1
[09:49:53]: [exec] APPDATA=C:\Documents and Settings\sunny.ABC\Application Data
[09:49:53]: [exec] BUILD_NUMBER=4.5.0.102
[09:49:53]: [exec] BUILD_NUMBER_FORMAT=4.5.0.{0}
[09:49:53]: [exec] BUILD_VCS_NUMBER_Build_Tools=24412
[09:49:53]: [exec] BUILD_VCS_NUMBER_Forecast=24412
[09:49:53]: [exec] CLASSPATH=.;C:\eclipse3.4.2\plugins;C:\Program Files\Java\jre6\lib\ext\QTJava.zip
[09:49:53]: [exec] CLIENTNAME=Console
[09:49:53]: [exec] CommonProgramFiles=C:\Program Files\Common Files
[09:49:53]: [exec] COMPUTERNAME=GLAMDRING
[09:49:53]: [exec] ComSpec=C:\WINDOWS\system32\cmd.exe
[09:49:53]: [exec] FP_NO_HOST_CHECK=NO
[09:49:53]: [exec] HOMEDRIVE=Z:
[09:49:53]: [exec] HOMEPATH=\
[09:49:53]: [exec] HOMESHARE=\\OOGG\sunny
[09:49:53]: [exec] JAVA_HOME=C:\Program Files\Java\jdk1.5.0_16
[09:49:53]: [exec] LOGONSERVER=\\BCD
[09:49:53]: [exec] NAntHome=C:\nant-0.86-beta1
[09:49:53]: [exec] NUMBER_OF_PROCESSORS=1
[09:49:53]: [exec] OS=Windows_NT
[09:49:53]: [exec] Path=C:\Program Files\Java\jdk1.5.0_16;C:\nant-0.86-beta1\bin;C:\apache-ant-1.7.1\bin;C:\Program Files\Java\jdk1.5.0_16\bin;C:\oracle\product\10.2.0\client_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI.ACE\;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Java\jdk1.5.0_16;C:\Program Files\QuickTime\QTSystem\;C:\WINDOWS\system32\WindowsPowerShell\v1.0
[09:49:53]: [exec] PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PSC1
[09:49:53]: [exec] PGLOCALEDIR=C:\Program Files\PostgreSQL\8.3\share\locale
[09:49:53]: [exec] PROCESSOR_ARCHITECTURE=x86
[09:49:53]: [exec] PROCESSOR_IDENTIFIER=x86 Family 15 Model 39 Stepping 1, AuthenticAMD
[09:49:53]: [exec] PROCESSOR_LEVEL=15
[09:49:53]: [exec] PROCESSOR_REVISION=2701
[09:49:53]: [exec] ProgramFiles=C:\Program Files
[09:49:53]: [exec] PROMPT=$P$G
[09:49:53]: [exec] QTJAVA=C:\Program Files\Java\jre6\lib\ext\QTJava.zip
[09:49:53]: [exec] SESSIONNAME=Console
[09:49:53]: [exec] SystemDrive=C:
[09:49:53]: [exec] SystemRoot=C:\WINDOWS
[09:49:53]: [exec] TEAMCITY_BUILDCONF_NAME=Module Forecast
[09:49:53]: [exec] TEAMCITY_BUILD_PROPERTIES_FILE=C:\BuildAgent\temp\agentTmp\teamcity.build36052.properties
[09:49:53]: [exec] TEAMCITY_JRE=C:\Program Files\Java\jdk1.5.0_16
[09:49:53]: [exec] TEAMCITY_PROJECT_NAME=demo 4.5.0
[09:49:53]: [exec] TEAMCITY_VERSION=4.5 (build 8944)
[09:49:53]: [exec] TEMP=C:\BuildAgent\temp\buildTmp
[09:49:53]: [exec] TMP=C:\BuildAgent\temp\buildTmp
[09:49:53]: [exec] USERDOMAIN=ABC
[09:49:53]: [exec] USERNAME=sunny
[09:49:53]: [exec] USERPROFILE=C:\Documents and Settings\sunny.ABC
[09:49:53]: [exec] VS80COMNTOOLS=C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\
[09:49:53]: [exec] VS90COMNTOOLS=c:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\
[09:49:53]: [exec] windir=C:\WINDOWS
[09:49:53]: [exec] WRAPPER_ARCH=x86
[09:49:53]: [exec] WRAPPER_BITS=32
[09:49:53]: [exec] WRAPPER_FILE_SEPARATOR=\
[09:49:53]: [exec] WRAPPER_OS=windows
[09:49:53]: [exec] WRAPPER_PATH_SEPARATOR=;
[09:49:53]: [copyNUnitAddins] teamcity.build.properties.file:C:\BuildAgent\temp\agentTmp\teamcity.build36052.properties
[09:49:53]: [copyNUnitAddins] teamcity.dotnet.nunitaddin:C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.TeamCity.NUnitAddin-NUnit
[09:49:53]: [copyNUnitAddins] teamcity.dotnet.nunitlauncher:C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe
[09:49:53]: [copyNUnitAddins] teamcity.dotnet.nunitlauncher.msbuild.task:C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.MSBuildLoggers.dll
[09:49:53]: [copyNUnitAddins] teamcity.dotnet.nunitlauncher1.1:C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher1.1.exe
[09:49:53]: [copyNUnitAddins] teamcity.dotnet.nunitlauncher2.0:C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher2.0.exe
[09:49:53]: [copyNUnitAddins] teamcity.dotnet.nunitlauncher2.0.vsts:C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher2.0.VSTS.exe
[09:49:53]: [copyNUnitAddins] teamcity.dotnet.platform:C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.TeamCity.PlatformProcessRunner.1.1.exe
0

I don't think I change any environment variables for NUnit-Console.exe process.

version of NUnit is the same as version of TeamCity addin for NUnit. Boath are 2.4.8.0

I did copy TeamCity addin for NUnit on every build.

What do you mean "adding 'plugins' folder"?  you means add "plugins" folder under the NUnit and copy the teamCity addins to this folder?

0

Sorry, I try more test and seems like nunit project doesn't work.  If I change to the .dll file. I saw three more line below in the build log.

[11:38:22]: [exec] TeamCity addin initializing...
[11:38:22]: [exec] TeamCity addin loaded
[11:38:23]: [exec] TeamCity addin installed
[11:38:23]: [exec] Could not load file or assembly 'nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77' or one of its dependencies. The system cannot find the file specified.


It looks like the teamcity  addins workings. But  I have to use nunit project because I don't want to copy all the depencies all the time.


Any idea?

0

I confirmed that teamCity addin work for .dll but not nunit project.

It works before. I get it working a few times and now it is broken.

Can you fix it?

Thanks

0

Here is the buildlog that I get nunit project (test.nunit, I create it on the fly )working before:

[16:34:57]: runUnitTestInTeamCity (1m:29s)
[16:34:57]: [runUnitTestInTeamCity] mkdir
[16:34:57]: [runUnitTestInTeamCity] copy
[16:34:57]: [runUnitTestInTeamCity] if
[16:34:57]: [runUnitTestInTeamCity] Running NUnit test
[16:34:57]: [runUnitTestInTeamCity] exec (1m:29s)
[16:34:57]: [exec] Starting 'C:\BuildAgent\work\1e6d7e0dcbc08afc\build\Nunit\run-nunit-cmdline.bat (A.Tests)' in 'C:\BuildAgent\work\1e6d7e0dcbc08afc\forecast'
[16:35:01]: test.nunit (1m:24s)
[16:35:57]: [test.nunit] A.Tests.Narrative.NarrativeTest.testNarrativeCreation (6s)
[16:35:57]: [A.Tests.Narrative.NarrativeTest.testNarrativeCreation] [Test Output] Setup started  Setup complete  testNarrativeCreation  testNarrativeCreation complete  TearDown started  TearDown complete
[16:36:19]: [test.nunit] A.Tests.Results.ResultSetTest.TestResultSetCreate (7s)
[16:34:57]: [exec] NAnt 0.85 (Build 0.85.2139.0; nightly; 11/9/2005)
[16:34:57]: [exec] Copyright (C) 2001-2005 Gerry Shaw
[16:34:57]: [exec] http://nant.sourceforge.net
[16:34:58]: [exec] Buildfile: file:///C:/BuildAgent/work/1e6d7e0dcbc08afc/build/NUnit/nunit-test.build
[16:34:58]: [exec] Target framework: Microsoft .NET Framework 1.1
[16:34:58]: [exec] Target(s) specified: test-console
[16:34:58]: [exec] make-test-files:
[16:34:58]: [exec]      [echo] Running NUnit on A.Tests
[16:34:58]: [exec]      [echo] Adding module path core
[16:34:58]: [exec]      [echo] Adding module path loaders
[16:34:58]: [exec]      [echo] Adding module path economic
[16:34:58]: [exec]      [echo] Adding module path forecast
[16:34:58]: [exec]      [echo] Adding module path clients_cue
[16:34:58]: [exec]      [echo] Adding module path reserves
[16:34:58]: [exec]      [echo] Adding module path technicalreserves
[16:34:58]: [exec] test-console:
[16:34:59]: [exec]      [exec] NUnit version 2.4.8
[16:34:59]: [exec]      [exec] Copyright (C) 2002-2007 Charlie Poole.
[16:34:59]: [exec]      [exec] Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
[16:34:59]: [exec]      [exec] Copyright (C) 2000-2002 Philip Craig.
[16:34:59]: [exec]      [exec] All Rights Reserved.
[16:34:59]: [exec]      [exec]
[16:34:59]: [exec]      [exec] Runtime Environment -
[16:34:59]: [exec]      [exec]    OS Version: Microsoft Windows NT 5.1.2600 Service Pack 3
[16:34:59]: [exec]      [exec]   CLR Version: 2.0.50727.3082 ( Net 2.0.50727.3082 )
[16:34:59]: [exec]      [exec]
[16:35:00]: [exec]      [exec] TeamCity addin initializing...
[16:35:00]: [exec]      [exec] TeamCity addin loaded
[16:35:01]: [exec]      [exec] TeamCity addin installed
[16:35:01]: [exec]      [exec] TestFixtureSetup started
[16:35:57]: [exec]      [exec] TestFixtureSetup complete
[16:35:57]: [exec]      [exec] .Setup started
[16:36:03]: [exec]      [exec] Setup complete
[16:36:03]: [exec]      [exec] testNarrativeCreation
[16:36:04]: [exec]      [exec] testNarrativeCreation complete
[16:36:04]: [exec]      [exec] TearDown started
[16:36:04]: [exec]      [exec] TearDown complete
[16:36:04]: [exec]      [exec] Setup Test Fixture for ResultSet
[16:36:04]: [exec]      [exec] Initialize Database
[16:36:19]: [exec]      [exec] Initialize Database - Complete
[16:36:19]: [exec]      [exec] Setup Test Fixture for ResultSet - Complete
[16:36:26]: [exec]      [exec] .
[16:36:26]: [exec]      [exec] Tests run: 2, Failures: 0, Not run: 0, Time: 84.625 seconds
[16:36:26]: [exec]      [exec]
[16:36:26]: [exec]      [exec]
[16:36:27]: [exec] BUILD SUCCEEDED - 0 non-fatal error(s), 3 warning(s)
[16:36:27]: [exec] Total time: 88.6 seconds.
0

Hereis the script to run the nunit project

    <target name="runOneUnitTest">
        <if test="${property::exists('RUN_UNIT_TEST')}">
            <echo message="Running One NUnit test" />
            <exec program="build/NUnit/nunit-console.exe"
            commandline="bin\tests\core\A\test.nunit" />
         </if>
    </target>

Here is the nunit project file

<NUnitProject>
  <Settings activeconfig="Test"  appbase="../../../../"/>
  <Config name="Test" appbase="." binpath="${binpath};3rdParty/libs;3rdParty/jars;bin/tests/${moduleName}/${artifactName}">
    <assembly path="bin\tests\core\A\A.Tests.dll " />
  </Config>
</NUnitProject>


Here is the script to run the dll file

    <target name="runOneUnitTest">
        <if test="${property::exists('RUN_UNIT_TEST')}">
            <echo message="Running One NUnit test" />
            <exec program="build/NUnit/nunit-console.exe"
            commandline="bin\tests\core\A\A.Tests.dll "   />
         </if>
    </target>

0

By the way. If I use nunit-console.exe to run a nunit project. Does it still support "Run recently failed tests first"?

0

No, test reordering is supported only for TeamCity nunit runner. We need to have a full control under NUnit to support this feature.

You may consider copying test assemblies and production assemblies to some temporary folder to run tests. Is that possible?

0

I've created an issue in our tracker for your problem. Please
watch/vote/have a look on it at
http://www.jetbrains.net/tracker/issue2/TW-8117

Thanks!

0

Thanks.

There are  differnet ways to run nunit in teamcity unser nant runner.

1. TeamCity Addin for NUnit. it will call nunit-console.exe to run nunit. If I have multi assemblies/projects. I will do a "foreach"  to run unit test one by one. I think it won't support this feature.

2. Nunit for Nant build runner. It use a <nunit2> task to run multi assemblies. it doesn't support nunit project. I think it will support this feature.

3. Teamcity NUnit test launcher. we can invoke it from the nant script.It doesn't support nunit project I think it will support this feature.


To Conclusion. Only if we use <nunit2> task ot invoke Teamcity NUnit test launcher to run dll assembly. it will support this feature. otherwise. it will just ingore it.


It that right?

0

<nunit2> task and TeamCity bundled NUnit launcher supports tests reordering.
TeamCity Addin for NUnit does not support tests reordering feature.

0

Do you have a nunit addin for Nunit 2.5.0.9122?

the current 2.5.0 addin doesn't work .

0

I've fixed it. We are going to release 4.5.1 in a week.
Please let me know if you need a patch quicker

0

Geart Job. Thanks a lot.

If I my test project need to reference nunit.core.dll and nunit.core.interfaces.dll (Nunit 2.4.8). So I copy these two dlls to the working  directory. But the teamcity nunit addins won't get installed and I have no on-the-fly test report. If I delete these two dlls. everything works fine. Will the teamcity 4.5.1 fix this problem?

This problem  brother me a lot.

Thanks

0

I've created an issue for this at
http://www.jetbrains.net/tracker/issue2/TW-8171

Could you please watch/vote/have a look on it.

Thanks!

0
Avatar
Aleksander Heintz

I've found a simple working solution:

    <target name="setup-tests" description="Setup tests">
        <if test="${property::exists('teamcity.dotnet.nunitaddin')}">
            <copy todir="${build.dir}/bin" flatten="true">
                <fileset basedir="/">
                    <include name="${nant::scan-probing-paths('nunit.framework.dll')}" />
                </fileset>
            </copy>
        </if>
    </target>

0

Please sign in to leave a comment.