CruiseControl.Net and NUnit - tests are being completed, but no task?

I have a CruiseControl.Net setup using Nant to clear previous logs, and then it starts the msbuild of the VS project, and finally runs nunit-console to run the tests.

It seems like he earned a few seconds (excellent) and then switched to 600 tests, which takes about a minute. However, despite the fact that the log files are there, he sits there, "nothing" for 10 minutes, after which the built-in timeout and the process ends. The CruiseControl.NET webpage shows the result as unsuccessful, with the exception of:

ThoughtWorks.CruiseControl.Core.Tasks.BuilderException: Command Line Build timed out (after 600 seconds)
   at ThoughtWorks.CruiseControl.Core.Tasks.ExecutableTask.Execute(IIntegrationResult result)
   at ThoughtWorks.CruiseControl.Core.Tasks.TaskBase.Run(IIntegrationResult result)
   at ThoughtWorks.CruiseControl.Core.Project.RunTask(ITask task, IIntegrationResult result, Boolean isPublisher)
   at ThoughtWorks.CruiseControl.Core.Project.RunTasks(IIntegrationResult result, IList tasksToRun, Dictionary`2 parameterValues)
   at ThoughtWorks.CruiseControl.Core.Project.Run(IIntegrationResult result)
   at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Build(IIntegrationResult result)
   at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Integrate(IntegrationRequest request) BaseDirectory: , Executable: C:\Program Files\NUnit 2.5.8\bin\net-2.0\nunit-console.exe

Below is the ccnet.config script. I tried to change the timeout to 3 minutes just in case it was something connected with it, but even if it worked (it’s not), it’s a clever hack, because in truth, when the tests are finished, they should exit gracefully !

I ran the command on the command line and confirmed that it only takes one minute to execute it. Any theories?

<cruisecontrol xmlns:cb="urn:ccnet.config.builder">

    <project name="CodeTests">
      <workingDirectory>C:\Source\Wholesale\Comp.EventControl.TestingFramework\</workingDirectory>
      <artifactDirectory>C:\Source\Wholesale\Comp.EventControl.TestingFramework\</artifactDirectory>

    <prebuild>
    <!-- clean nunit output to avoid CCNET reporting
           about previous build tests if current build fails -->
      <nant>
        <executable>C:\Nant\bin\nant.exe
        </executable>
        <baseDirectory>C:\Source\Wholesale\Comp.EventControl.TestingFramework</baseDirectory>
        <nologo>false</nologo>
        <buildFile>nant.build</buildFile>
        <targetList>
          <target>cleanNunit</target>
        </targetList>
      </nant>
    </prebuild>

    <tasks>
        <msbuild>
            <executable>C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
            </executable>
            <workingDirectory>C:\Source\Wholesale\Comp.EventControl.TestingFramework\CodeReboot
            </workingDirectory>
        <projectFile>CodeReboot.sln</projectFile >
            <buildArgs>/noconsolelogger 
            /v:quiet 
            /noconlog 
            /p:Configuration=Debug
            /p:ReferencePath="C:\Program Files\NUnit 2.5.8\bin;C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0"
            /p:AdditionalReferencePath="C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0"
            </buildArgs>
            <targets>ReBuild</targets >
            <timeout>180</timeout >
            <logger>c:\Program Files\CruiseControl.NET\server\Rodemeyer.MsBuildToCCNet.dll</logger>

        </msbuild>
        <exec>
            <executable>C:\Program Files\NUnit 2.5.8\bin\net-2.0\nunit-console.exe
            </executable >
            <buildArgs>/xml:C:\Source\Wholesale\Comp.EventControl.TestingFramework\nunit-results.xml
            /nologo C:\Source\Wholesale\Comp.EventControl.TestingFramework\CodeReboot\CodeReboot\bin\Debug\CodeReboot.dll
            </buildArgs>
        </exec>
    </tasks>
    <publishers>
      <merge>
        <files>
          <file>C:\Source\Wholesale\Comp.EventControl.TestingFramework\nunit-results.xml
          </file>
        </files>
      </merge>
      <xmllogger />
      <statistics />
      <artifactcleanup cleanUpMethod="KeepLastXBuilds"
        cleanUpValue="20" />
    </publishers>

    </project>
</cruisecontrol>
+3
source share
2 answers

nunit ? 2.5.7/2.5.8 , - nunit- . , nunit, . 2.5.9 , "602761 nunit-agent ". 2.5.9, .

+4

, , . ? , nunit.

, , . , .

, , , ( ) , , NUnit . , , (, ).

/ , ( , 600 , , / , unit test ~ 1 ).

+1
source

Source: https://habr.com/ru/post/1783907/


All Articles