我尝试使用specflow.retry插件https://github.com/DamirAinullin/specflow-retry在specflow中重新运行失败的测试

这是我的App.config文件:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<unitTestProvider name="nUnit" />
<plugins>
<add name="SpecFlow.Retry.Generator" path="..\packages\SpecFlow.Retry.2.4.0\lib\net45" type="Generator" />
</plugins>
</configuration>如果有人从我这方面给出一点提示,我将不胜感激
以下是我在构建项目时得到的一些警告:
: warning NU1608: Detected package version outside of dependency constraint: SpecFlow.CustomPlugin 2.4.0 requires SpecFlow (= 2.4.0) but version SpecFlow 3.3.74 was resolved.
warning NU1701: Package 'FluentAssert 1.0.0.11' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETCoreApp,Version=v3.1'. This package may not be fully compatible with your project.
: warning NU1701: Package 'SpecFlow.Retry 2.4.0' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETCoreApp,Version=v3.1'. This package may not be fully compatible with your project.
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2081,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\Users\me\.nuget\packages\magick.net-q16-x64\7.21.1\lib\netstandard20\Magick.NET-Q16-x64.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
: warning CS0618: 'ScenarioContext.Current' is obsolete: 'Please get the ScenarioContext via Context Injection - https://www.specflow.org/documentation/Context-Injection/'
: warning CS0618: 'ScenarioContext.Current' is obsolete: 'Please get the ScenarioContext via Context Injection - https://www.specflow.org/documentation/Context-Injection/'
>Done building project "TestAutomation.UI.Tests.csproj".
=发布于 2021-01-18 17:18:59
SpecFlow.Retry仅支持SpecFlow 2.*。
你不能在SpecFlow 3中使用它,我们在插件基础设施上做了很多改变,从2到3。
看起来这个插件已经不再维护了,因为最新的更改是在两年前完成的。
如果你想切换单元测试运行器,你可以切换到内置了重试功能的SpecFlow+运行器。https://docs.specflow.org/projects/specflow-runner/en/latest/Profile/Execution.html上的文档
全面披露:我是SpecFlow和SpecFlow+的社区经理
https://stackoverflow.com/questions/65586334
复制相似问题