Currently, we are using .Net Core 2.1 Framework for our test automation Web API Project.
I am trying to run one of the test project dlls for test cases execution.
Please find below the command through Visual Studio IDE
Command : dotnet test APItests.dll,
The above command works well on my local machine with Visual Studio, test cases are getting executed.
I have built the Azure Build pipeline as well as the release pipeline for the same. Also artifacts are getting published to drop location.
But in the release pipeline .Net core test task is failing with the below error.
Framework: .Net Core 2.1
Error:
An assembly specified in the application dependencies manifest (APItests.deps.json) was not found: package: ‘Microsoft.AspNet.WebApi.Client’, version: ‘5.2.6’ path: ‘lib/netstandard2.0/System.Net.Http.Formatting.dll’
Could you please find the YAML file details below.
Steps:
task: DotNetCoreCLI@2 displayName ‘dotnet custom’ inputs: command: custom projects: ‘\TestAutomation.Application.Hosting.WebApi\ApiTests.dll’ custom: vstest workingDirectory: ‘$(System.DefaultWorkingDirectory)’
Could you please have a look once and let me know the suggested solution for the same.