VS2019测试浏览器未使用specflow + runner运行netcoreapp3.1项目的测试

问题描述 投票:0回答:1

此处示例回购-https://github.com/venkatrao-rgare/specflow-vs2019/在我清理并构建测试后,会在测试资源管理器中生成测试,当我尝试右键单击测试并运行时,它将失败。

我看着“ TestResults”文件夹在日志中看到了这个,我在dotnet.exe中没有C:\Program Files (x86)\dotnet\,不确定在哪里找到它。

有人可以帮忙吗?我应该安装/配置什么才能使此测试按预期运行?

2020-02-04T12:34:26.0176209-06:00:System.ComponentModel.Win32Exception (2): The system cannot find the file specified.
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at TechTalk.SpecRun.Framework.Execution.OutOfProc.OutProcExecutorManager.StartProcess(ExecutorProcessInfo executorProcessInfo)
   at TechTalk.SpecRun.VisualStudio.TestAdapter.VsOutProcExecutorManager.StartProcess(ExecutorProcessInfo executorProcessInfo)```


visual-studio-2019 specflow netcoreapp3.1
1个回答
0
投票

您在项目中有此引用:

<ItemGroup>
    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
    <PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
    <PackageReference Include="SpecFlow" Version="3.1.82" />
    <PackageReference Include="SpecFlow.Tools.MsBuild.Generation" Version="3.1.82" />
    <PackageReference Include="SpecRun.Runner" Version="3.1.48" />
    <PackageReference Include="SpecRun.SpecFlow" Version="3.1.48" />
</ItemGroup>

请删除对Microsoft.NET.Test.SdkNewtonsoft.Json的引用,然后运行测试。

© www.soinside.com 2019 - 2024. All rights reserved.