Reputation: 595
I have installed Visual studio 2015 on multiple PC and application that is using SpecFlow. The application is working normally on 1 pc because everything there was installed long time ago. However on the other PCs tests are not being displayed in the test explorer, and I need them in the test explorer. Please help
Upvotes: 7
Views: 13884
Reputation: 592
In addition to the accepted answer:
What helped me is installing the NUnit3TestAdapter
NuGet package:
Upvotes: 0
Reputation: 1266
You just need to add these configurations in your .csproj
file.
Remove Microsoft.NET.Test.Sdk
and replace it with Microsoft.TestPlatform.TestHost
Add these two in PropertyGroup
tag and rebuild the project
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
<GenerateRuntimeConfigDevFile>true</GenerateRuntimeConfigDevFile>
Upvotes: 0
Reputation: 11
if you have a file .srpofile in your solution, then adjust your gherkin steps according to file tags.# \in my case .srprofile is like below
<?xml version="1.0" encoding="utf-8"?>
<TestProfile xmlns="http://www.specflow.org/schemas/plus/TestProfile/1.5">
<Settings projectName="project.test" projectId="{9A19103F-16F7-4668-BE54-9A1E7A4F7556}" outputFolder=".\Results" />
<Execution stopAfterFailures="0" retryFor="None" testSchedulingMode="Sequential" />
<Filter>@automated</Filter>
<TestAssemblyPaths>
<TestAssemblyPath>project.test.dll</TestAssemblyPath>
</TestAssemblyPaths>
</TestProfile>
Upvotes: 0
Reputation: 41
For me, the test displayed after the Specflow MSTest
was added from NuGet.
Upvotes: 4
Reputation: 595
Thanks guys but I managed to fix my problem. The tests are displayed as soon as NUnit Test Adapter is installed:
Go to Tools->Extensions and updates ->Online->Visual Studio Gallery->Tools->Testing and select NUnit Test Adapter
Upvotes: 1
Reputation: 682
Tests are not displayed in the Test Explorer window when using SpecFlow+ Runner
I run into this all the time. There is a great section on the GitHub repo page for specflow that I keep bookmarked for when stuff like this comes up. Usually this one (deleting the cache file) fixes issues for me.
The Visual Studio Test Adapter cache may also get corrupted, causing tests to not be displayed. If this happens, try clearing your cache as follows:
https://github.com/techtalk/SpecFlow/wiki/Troubleshooting-Visual-Studio-Integration
Hope this helps
Upvotes: 1