SpecFlowOSS / SpecFlow

#1 .NET BDD Framework. SpecFlow automates your testing & works with your existing code. Find Bugs before they happen. Behavior Driven Development helps developers, testers, and business representatives to get a better understanding of their collaboration
https://www.specflow.org/
Other
2.24k stars 754 forks source link

Cannot find a data exchange file #1494

Closed UNCCoder closed 5 years ago

UNCCoder commented 5 years ago

SpecFlow Version:

Used Test Runner

Version number:

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

We could not find a data exchange file at the path TechTalk.SpecFlow.SpecFlowException: Unable to find plugin in the plugin search path: Blackbaud.UAT.SpecFlow.Selenium. 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: Blackbaud.UAT.SpecFlow.Selenium. Please check http://go.specflow.org/doc-plugins for details.
   at TechTalk.SpecFlow.Generator.Plugins.GeneratorPluginLoader.LoadPlugin(PluginDescriptor pluginDescriptor)
   at TechTalk.SpecFlow.Generator.GeneratorContainerBuilder.<>c__DisplayClass3.<LoadPlugins>b__1(PluginDescriptor pd)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.<ConcatIterator>d__59`1.MoveNext()
   at System.Linq.Buffer`1..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\MLYNNE\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\14.0\EXTENSIONS\ne23txfw.hiv\TechTalk.SpecFlow.VisualStudio.CodeBehindGenerator.exe
Parameters: GenerateTestFile --featurefile C:\Users\mlynne\AppData\Local\Temp\tmpB2B3.tmp --outputdirectory C:\Users\mlynne\AppData\Local\Temp --projectsettingsfile C:\Users\mlynne\AppData\Local\Temp\tmpB293.tmp
Working Directory: C:\Lynne\Test Projects\UnitTestProject\packages\SpecFlow.2.0.0\tools

Repro Project

Issue Description

I can't get the code generator working at all. I just get that error message.

Steps to Reproduce

I created a "test" project on VS 2015. I added the Blackbaud.UAT.Core and Blackbaud.UAT.Specflow.Selenium packages in the NUGET package manager. I also added the Visual Studio 2015 extension for Specflow. I added a feature file with the name of Constituent.Feature and this error message was generated.

SabotageAndi commented 5 years ago

The plugin wasn't yet updated to SpecFlow 3. It can't work.

SabotageAndi commented 5 years ago

Please ask the maintainer of it, to update it to SpecFlow 3.

UNCCoder commented 5 years ago

OK. I tried to get in touch with the author yesterday. but he is out of the office. What if I got back to a previous version of Specflow? I can update to version 2 under Manage Packages. I just am not sure what other packages would have to be set back to an earlier version as well.

SabotageAndi commented 5 years ago

All our packages have the same version number. Update them all to the same.

UNCCoder commented 5 years ago

That still did not work. I will wait until I can reach the author from Blackbaud about his plugin.

Stephen-Mc commented 5 years ago

Did you also downgrade your Visual Studio extension?

You can download previous versions of the extension from this page on GitHub. If you download an earlier version, please make sure you disable the option to update the extension automatically, otherwise it will be automatically updated with the new version again!

To prevent the Visual Studio integration from automatically updating:

  1. Select Tools | Extensions and Updates from the menu in Visual Studio
  2. Locate the SpecFlow extension in the list using the search field, if necessary.
  3. Disable the Automatically update this extension option.
  4. Don’t forget to enable this option again once you have upgraded to SpecFlow 2.3.2 or higher!
UNCCoder commented 5 years ago

I am about to start doing this. I added the extension and have unchecked the automatic update checkbox. I have downloaded a zip file from the location on GitHub that you showed me. However, now I am not sure what to do.

I get the following error when I try to run a simple test.

Test Name: A_AddConstituent Test FullName: UnitTestProject.A_ConstituentFeature.A_AddConstituent Test Source: C:\Lynne\Test Projects\UnitTestProject\UnitTestProject\Constituent.feature : line 9 Test Outcome: Failed Test Duration: 0:00:00

Result StackTrace:
at Blackbaud.UAT.SpecFlow.Selenium.RuntimePlugin.RegisterDependencies(ObjectContainer container) at TechTalk.SpecFlow.Infrastructure.TestRunContainerBuilder.CreateContainer(IRuntimeConfigurationProvider configurationProvider) at TechTalk.SpecFlow.TestRunnerManager.CreateTestRunnerManager(Assembly testAssembly, ITestRunContainerBuilder testRunContainerBuilder) at TechTalk.SpecFlow.TestRunnerManager.GetTestRunnerManager(Assembly testAssembly, ITestRunContainerBuilder testRunContainerBuilder) at TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(Assembly testAssembly, Nullable`1 managedThreadId) at UnitTestProject.A_ConstituentFeature.FeatureSetup(TestContext testContext) Result Message: Class Initialization method UnitTestProject.A_ConstituentFeature.FeatureSetup threw exception. System.MissingMethodException: System.MissingMethodException: Method not found: 'Void BoDi.ObjectContainer.RegisterInstanceAs(!!0, System.String)'..

My package file looks like this: <?xml version="1.0" encoding="utf-8"?>

UNCCoder commented 5 years ago

Package id="Blackbaud.UAT.Core" version="1.0.758.5" targetFramework="net452" Package id="Blackbaud.UAT.SpecFlow.Selenium" version="1.0.765.6" targetFramework="net452" Package id="Gherkin" version="3.2.0" targetFramework="net452" Package id="Newtonsoft.Json" version="12.0.1" targetFramework="net452" Package id="NUnit" version="2.7.0" targetFramework="net452" Package id="Selenium.Support" version="2.52.0" targetFramework="net452" Package id="Selenium.WebDriver" version="2.53.1" targetFramework="net452" Package id="SharpZipLib" version="1.1.0" targetFramework="net452" Package id="SpecFlow" version="2.0.0" targetFramework="net452" Package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net452" Package id="System.Threading.Tasks.Extensions" version="4.5.2" targetFramework="net452" Package id="System.ValueTuple" version="4.5.0" targetFramework="net452"

Stephen-Mc commented 5 years ago

You want to download the VSIX, not the source code (which is zipped). You should be able to simply run the VSIX to install the extension.

UNCCoder commented 5 years ago

I ran the VISX file and so have an earlier version of the SpecFlow extension for VS 2015. It still does not work. I have the original message again. TechTalk.SpecFlow.SpecFlowException: Unable to find plugin in the plugin search path: Blackbaud.UAT.SpecFlow.Selenium

UNCCoder commented 5 years ago

Okay, I am not trying this now in VS 2015 but in VS 2013.

I have SpecFlow 2.0.

package id="Blackbaud.UAT.Core" version="1.0.1429.1" targetFramework="net452" package id="Blackbaud.UAT.SpecFlow.Selenium" version="1.0.1235.1" targetFramework="net452" package id="Newtonsoft.Json" version="8.0.2" targetFramework="net452" package id="NUnit" version="2.6.0.12054" targetFramework="net452" package id="Selenium.Support" version="2.53.1" targetFramework="net452" package id="Selenium.WebDriver" version="2.53.1" targetFramework="net452" package id="SharpZipLib" version="0.86.0" targetFramework="net452" package id="SpecFlow" version="2.0.0" targetFramework="net452"

I have gotten an error message that the cursom tool 'SpecFlowSingleFileGenerator' failed. Generator

Any ideas on why this is happening?

UNCCoder commented 5 years ago

I am just going to wait until the author of the SpecFlow plugin gets it working with version 3.

lock[bot] commented 5 years ago

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.