Teamcity Nunit 3.0 command console not working

I am trying to use the NUnit 3.0 Console runner with Teamcity. Here is my confirmation.

enter image description here

When I run the configuration, I get the following error

>  Run Unit Tests (NUnit) (1s)
[10:44:03][Step 3/3] ##teamcity[buildStatisticValue key='buildStageDuration:buildStepRUNNER_3' value='0.0']
[10:44:03][Step 3/3] Starting: C:\TeamCity\buildAgent\work\e6cc09e5f0da4a07\Libs\NUnit.Console.3.0.1\tools\nunit3-console.exe C:\TeamCity\buildAgent\temp\buildTmp\O1YAIPlezg1Cm2NfZTD88h0Nb2Q14zOF.nunit --work=C:\TeamCity\buildAgent\work\e6cc09e5f0da4a07 --noresult --noheader
[10:44:03][Step 3/3] in directory: C:\TeamCity\buildAgent\work\e6cc09e5f0da4a07
[10:44:03][Step 3/3] Runtime Environment
[10:44:03][Step 3/3]    OS Version: Microsoft Windows NT 10.0.10586.0
[10:44:03][Step 3/3]   CLR Version: 4.0.30319.42000
[10:44:03][Step 3/3] 
[10:44:03][Step 3/3] Test Files
[10:44:03][Step 3/3]     C:\TeamCity\buildAgent\temp\buildTmp\O1YAIPlezg1Cm2NfZTD88h0Nb2Q14zOF.nunit
[10:44:03][Step 3/3] 
[10:44:04][Step 3/3] 
[10:44:04][Step 3/3] Errors and Failures
[10:44:04][Step 3/3] 
[10:44:04][Step 3/3] 1) Invalid : C:\TeamCity\buildAgent\temp\buildTmp\O1YAIPlezg1Cm2NfZTD88h0Nb2Q14zOF.nunit
[10:44:04][Step 3/3] Format of the executable (.exe) or library (.dll) is invalid.
[10:44:04][Step 3/3] 
[10:44:04][Step 3/3] Test Run Summary
[10:44:04][Step 3/3]     Overall result: Failed
[10:44:04][Step 3/3]    Tests run: 0, Passed: 0, Errors: 0, Failures: 0, Inconclusive: 0
[10:44:04][Step 3/3]      Not run: 0, Invalid: 0, Ignored: 0, Explicit: 0, Skipped: 0
[10:44:04][Step 3/3]   Start time: 2016-02-08 02:44:04Z
[10:44:04][Step 3/3]     End time: 2016-02-08 02:44:04Z
[10:44:04][Step 3/3]     Duration: 0.006 seconds
[10:44:04][Step 3/3] 
[10:44:04][Step 3/3] Process exited with code -2
[10:44:04][Step 3/3] ##teamcity[buildStatisticValue key='buildStageDuration:buildStepRUNNER_3' value='1095.0']
[10:44:04][Step 3/3] Step Run Unit Tests (NUnit) failed

From the error, I assume that she cannot find the Dll to run the tests, but I checked the path and the file in the verification directory, everything seems to be correct. Please tell me what am I doing wrong?

+4
source share
2 answers

Manually run the tests using the commands that the team city uses:

C:\TeamCity\buildAgent\work\e6cc09e5f0da4a07 : C:\TeamCity\buildAgent\work\e6cc09e5f0da4a07\Libs\NUnit.Console.3.0.1\tools\nunit3-console.exe C:\TeamCity\buildAgent\temp\buildTmp\O1YAIPlezg1Cm2NfZTD88h0Nb2Q14zOF.nunit --work = C:\TeamCity\buildAgent\work\e6cc09e5f0da4a07 --noresult --noheader

. https://github.com/nunit/docs/wiki/Console-Command-Line

, .

, JetBrains dotCover, , . , .

+2

, NuGet NUnit.ConsoleRunner v 3.5.0 . : " ", , NUnit.Extension.NUnitProjectLoader v 3.5.0. ( NUnit.Extension.VSProjectLoader, )

+1

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


All Articles