I have a .NET Core 2.2 Unit Test Setup in an Azure Dev Ops build pipeline, these are xunit tests
steps:
- task: DotNetCoreCLI@2
displayName: 'Unit Test'
inputs:
command: test
projects: '**/Wintegrate.[Tt]est*/*.csproj'
arguments: '--configuration $(buildConfiguration) '
timeoutInMinutes: 5
They are failing for a couple of reasons
Failed Wintegrate.Tests.BoomiRestClientTests.GetDeployedPackages
Error Message:
Assert.Equal() Failure
Expected: OK
Actual: 0
and
Failed Wintegrate.Tests.BoomiServiceTests.GetAtomsAndMolecules
Error Message:
Newtonsoft.Json.JsonReaderException : Error reading JObject from
JsonReader. Path '', line 0, position 0.
Stack Trace:
at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings
settings)
at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings
settings)
at Wintegrate.Domain.BoomiService.GetAtomsAndMolecules() in
d:\a\1\s\Wintegrate.Domain\BoomiService.cs:line 37
at Wintegrate.Tests.BoomiServiceTests.GetAtomsAndMolecules() in
d:\a\1\s\Wintegrate.Tests\BoomiServiceTests.cs:line 53
The tests work fine when running locally from Visual Studio