Open anthony0lai opened 2 years ago
A new finding I have is that the problem no longer exists in azure pipeline if I switch my test project into .net core 3.1
Strange issue. Do you make a clean build on the build agents? Perhaps there are some leftovers with old versions that make problems.
Yes both agents and build are clean.
The agents are claimed only from Microsoft as we don't host any in Azure pipeline. So they are completely clean without any previous code on the test project
FYI on detail of components in their agent - https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md
Ok, so you are using hosted agents. That makes it even more strange.
It worked with NUnit, or? Why did you switch to the SpecFlow+ Runner?
It worked fine using NUnit. We decided to switch to Specflow+ runner as NUnit + Specflow can no longer support retry on fail
Ah, the retry functionality. Did you tried the one included in the VS Test task?
Hit into the same problem when I tried with VSTest task previously
SpecFlow Version
3.9.8
Which test runner are you using?
SpecFlow+ Runner
Test Runner Version Number
3.9.7
.NET Implementation
.NET 5.0
Project Format of the SpecFlow project
Classic project format using
packages.config
.feature.cs files are generated using
SpecFlow.Tools.MsBuild.Generation NuGet package
Test Execution Method
TFS/VSTS/Azure DevOps – Task – PLEASE SPECIFY THE NAME OF THE TASK
SpecFlow Section in app.config or content of specflow.json
Test-common contains some common test steps from an nuget package in our on own azure artefactory
Issue Description
When switching my existing .net 5.0 test project from NUnit to Specflow+ runner in Azure pipeline execution during dotnet test step
All test scenarios are finally skipped due to this exception. One thing I notice is that the target framework shows .NetCoreApp 5.0, instead of expected .Net 5.0
Steps to Reproduce
The change includes
The failing dotnet test step in Azure Devops yaml is
All test scenarios are always skipped, with exception as shown in description. The whole log file is attached MottMac.AnalyticalEngine.GUITest_MottMac.AnalyticalEngine.GUITest_2021-11-10T030647.log
Running the same dotnet cli command in local (by extracting the command line displayed in azure pipeline console) is all fine, with only numerous of warning that assembly Cache file are not found (likely to be due to TFM is NetCoreApp, instead of .Net)
Link to Repro Project
No response