Closed jbhano closed 5 years ago
And if I go back to Specflow v2.4.0, SpecRun.Runner v1.8.5, SpecRun.SpecFlow v1.8.5 - it's not able to find any test in Test Explorer
SpecFlow.Tools.MSBuild.Generation
is needed for SpecFlow 3. See https://specflow.org/2019/generating-code-behind-files-using-msbuild/ & https://specflow.org/documentation/Generate-Tests-from-MsBuild/
Also remove the plugin section from your app.config. SpecFlow 3 doesn't use it anymore for plugins.
Added SpecFlow.Tools.MSBuild.Generation nuget package, code snippet in .proj file and removed 'SpecFlowSingleFileGenerator' from all feature files. Also, removed plug-in section, now getting below issue and if I comment unitTestProvider, error goes away but it's not finding tests and error in Tests log is "Unable to fetch symbols for class: Specflow.SpecRun"
Severity Code Description Project File Line Suppression State Error [SpecFlow] System.Configuration.ConfigurationErrorsException: Unrecognized element 'unitTestProvider'. at System.Configuration.ConfigurationElement.DeserializeElement(XmlReader reader, Boolean serializeCollectionKey) at System.Configuration.ConfigurationSection.DeserializeSection(XmlReader reader) at TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler.CreateFromXml(String xmlContent) at TechTalk.SpecFlow.Configuration.ConfigurationLoader.Load(SpecFlowConfiguration specFlowConfiguration, ISpecFlowConfigurationHolder specFlowConfigurationHolder) at TechTalk.SpecFlow.Generator.Configuration.GeneratorConfigurationProvider.LoadConfiguration(SpecFlowConfiguration specFlowConfiguration, SpecFlowConfigurationHolder specFlowConfigurationHolder) at TechTalk.SpecFlow.Generator.Configuration.GeneratorConfigurationProviderExtensions.LoadConfiguration(IGeneratorConfigurationProvider configurationProvider, SpecFlowConfigurationHolder configurationHolder) at TechTalk.SpecFlow.Generator.Project.ProjectReader.ReadSpecFlowProject(String projectFilePath, String rootNamespace)
Ok, you have also the unitTestProvider set in the app.config You need to remove this also.
See https://specflow.org/2019/updating-to-specflow-3/ - App.config Deprecated
OK, created specflow.json.
`{ "bindingCulture": { "language": "en-us" }, "language": { "feature": "en-us" },
"unitTestProvider": { "name" : "SpecRun" }, "plugins": []
} `
It's still not able to find any test in Tets Explorer - getting following error in Tests pane
[4/8/2019 5:56:54 PM Informational] NUnit Adapter 3.13.0.0: Test discovery starting [4/8/2019 5:56:54 PM Informational] NUnit Adapter 3.13.0.0: Test discovery complete [4/8/2019 5:56:54 PM Error] Unable to fetch symbols for class: xxxx.Specflow.SpecRun [4/8/2019 5:56:54 PM Warning] Unable to fetch source Information for test method: xxx.Specflow::SpecRun
You need to completely remove the unitTestProvider from your configuration, as Andi wrote above. The unit test provider is now configured by installing the appropriate NuGet package, i.e. one of the following:
So remove this section:
"unitTestProvider": {
"name" : "SpecRun"
},
Here's my specflow.json
{ "bindingCulture": { "language": "en-us" }, "language": { "feature": "en-us" },
"plugins": []
}
And I have SpecRun.Runner, still same issue - Test explorer not able to find tests
@jbhano We released yesterday new packages for SpecFlow and SpecFlow+Runner. My current assumption is, that you have a problem with the manual editing of the csproj file. With the latest release, it isn't anymore needed to manually change your csproj.
Closed because of inactivity. Please reopen or leave a comment if you still have this issue.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
We could not find a data exchange file at the path TechTalk.SpecFlow.SpecFlowException:
SpecFlow Version:
Used Test Runner
Version number:3.0.255
Visual Studio Version
Are the latest Visual Studio updates installed?
.NET Framework:
Test Execution Method:
<SpecFlow> Section in app.config or content of specflow.json
Repro Project
Issue Description
We could not find a data exchange file at the path TechTalk.SpecFlow.SpecFlowException: Unable to find plugin in the plugin search path: SpecRun. Please check http://go.specflow.org/doc-plugins for details.
Please open an issue at https://github.com/techtalk/SpecFlow/issues/ Complete output: TechTalk.SpecFlow.SpecFlowException: Unable to find plugin in the plugin search path: SpecRun. Please check http://go.specflow.org/doc-plugins for details. at TechTalk.SpecFlow.Generator.Plugins.GeneratorPluginLoader.LoadPlugin(PluginDescriptor pluginDescriptor) at TechTalk.SpecFlow.Generator.GeneratorContainerBuilder.<>cDisplayClass3.b 1(PluginDescriptor pd)
at System.Linq.Enumerable.WhereSelectEnumerableIterator
2.MoveNext() at System.Linq.Enumerable.<ConcatIterator>d__59
1.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable
1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) at TechTalk.SpecFlow.Generator.GeneratorContainerBuilder.CreateContainer(SpecFlowConfigurationHolder configurationHolder, ProjectSettings projectSettings) at TechTalk.SpecFlow.Generator.TestGeneratorFactory.CreateGenerator(ProjectSettings projectSettings) at TechTalk.SpecFlow.VisualStudio.CodeBehindGenerator.Actions.GenerateTestFileAction.GenerateTestFile(GenerateTestFileParameters opts)Command: c:\users\bhanoj\appdata\local\microsoft\visualstudio\15.0_2f1a2f05\extensions\vffh40qn.t1k\TechTalk.SpecFlow.VisualStudio.CodeBehindGenerator.exe Parameters: GenerateTestFile --featurefile C:\Users\bhanoj\AppData\Local\Temp\6\tmpD618.tmp --outputdirectory C:\Users\bhanoj\AppData\Local\Temp\6 --projectsettingsfile C:\Users\bhanoj\AppData\Local\Temp\6\tmpD617.tmp Working Directory:
Steps to Reproduce
Specflow for Visual Studio Version: 2019.0.9.46639