Quantcast
Channel: TeamCity : Powerful CI/CD for DevOps-centric teams | The JetBrains Blog
Viewing all articles
Browse latest Browse all 916

Comment on Test .NET Core projects with TeamCity by Ashleyc

$
0
0

I have a .NET CLI (dotnet) test Build Step failing and yet subsequent build steps are executed.

When I manually run the test step from the command line it exits with a code of 1.
The Failure Conditions for my build configuration have the following selected:
* the build process exit code is not zero
* at least one test failed
The subsequent build steps are setup to Execute:
* If all previous steps finished successfully

Is it possible the .net runner has an issue similar to
https://youtrack.jetbrains.com/issue/TW-17002

Here is the Build log output
[13:40:04]Step 4/8: Run Tests (.NET CLI (dotnet)) (2s)
[13:40:04][Step 4/8] Starting: “C:\Program Files\dotnet\dotnet.exe” test C:\\BuildAgent\\work\\a5daf7c37b533830\\Blah\\Blah.csproj –no-build @C:\\BuildAgent\\temp\\buildTmp\\41ee3ffafd994f5cb7642ee601c41319.rsp
[13:40:04][Step 4/8] in directory: C:\BuildAgent\work\a5daf7c37b533830
[13:40:05][Step 4/8]
[13:40:05][Step 4/8] Build succeeded.
[13:40:05][Step 4/8] 0 Warning(s)
[13:40:05][Step 4/8] 0 Error(s)
[13:40:05][Step 4/8]
[13:40:05][Step 4/8] Time Elapsed 00:00:00.59
[13:40:05][Step 4/8]
[13:40:05][Step 4/8] Test run for C:\BuildAgent\work\a5daf7c37b533830\Blah\bin\Debug\netcoreapp2.0\Blah.dll(.NETCoreApp,Version=v2.0)
[11:02:25][Step 4/8] Microsoft (R) Test Execution Command Line Tool Version 15.3.0-preview-20170628-02
[11:02:25][Step 4/8] Copyright (c) Microsoft Corporation. All rights reserved.
[11:02:25][Step 4/8]
[11:02:25][Step 4/8] Starting test execution, please wait…
[11:02:27][Step 4/8] Blah.dll
[11:02:27][Blah.dll] Blah.UnitTest1.TestMethod1
[11:02:27][Step 4/8] Failed Blah.UnitTest1.TestMethod2
[11:02:27][Step 4/8] Error Message:
[11:02:27][Step 4/8] Assert.AreEqual failed. Expected:. Actual:.
[11:02:27][Step 4/8] Stack Trace:
[11:02:27][Step 4/8] at Blah.UnitTest1.TestMethod2() in C:\BuildAgent\work\a5daf7c37b533830\Blah\UnitTest1.cs:line 17
[11:02:27][Step 4/8]
[11:02:27][Blah.dll] Blah.UnitTest1.TestMethod2
[11:02:27][Blah.UnitTest1.TestMethod2] Assert.AreEqual failed. Expected:. Actual:.
[11:02:27][Blah.UnitTest1.TestMethod2] at Blah.UnitTest1.TestMethod2() in C:\BuildAgent\work\a5daf7c37b533830\Blah\UnitTest1.cs:line 17
[11:02:27][Step 4/8]
[11:02:27][Step 4/8] Test Run Failed.
[11:02:27][Step 4/8] Total tests: 2. Passed: 1. Failed: 1. Skipped: 0.
[11:02:27][Step 4/8] Test execution time: 1.8562 Seconds
[11:02:27][Step 4/8]
[11:02:27][Step 4/8] Build FAILED.
[11:02:27][Step 4/8] 0 Warning(s)
[11:02:27][Step 4/8] 0 Error(s)
[11:02:27][Step 4/8]
[11:02:27][Step 4/8] Time Elapsed 00:00:04.74
[11:02:27][Step 4/8]
[11:02:27][Step 4/8] Process exited with code 1
[11:02:27]Step 5/8: Publish (.NET CLI (dotnet)) (9s)
[11:02:27][Step 5/8] MSBuild Response File


Viewing all articles
Browse latest Browse all 916

Trending Articles