Reqnroll icon indicating copy to clipboard operation
Reqnroll copied to clipboard

Reqnroll.SpecFlowCompatibility.Actions packages aren't compatible with Reqnroll 3

Open 9566707474 opened this issue 4 months ago • 4 comments

Reqnroll Version

3.0.0

Which test runner are you using?

xUnit 2

Test Runner Version Number

xunit.runner.visualstudio version 3.1.4

.NET Implementation

.NET Framework 4.6.2 or later

Test Execution Method

Visual Studio Test Explorer

Content of reqnroll.json configuration file

{ "$schema": "https://schemas.reqnroll.net/reqnroll-config-latest.json",

"generator": { "allowRowTests": false } }

Issue Description

Not able to build the application.
Reqnroll.Tools.MsBuild.Generation.targets error in line 93.

[Reqnroll] System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeLoadException: Method 'GenerateUnitTestFixture' in type 'Reqnroll.Actions.Configuration.Generation.MultiFeatureGenerator' from assembly 'Reqnroll.Actions.Configuration.Generation.ReqnrollPlugin, Version=0.2.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation. at Reqnroll.Actions.Configuration.Generation.MultiFeatureGeneratorProvider..ctor(IObjectContainer container, ITargetIdentifier targetIdentifier) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Reqnroll.BoDi.ObjectContainer.CreateObject(Type type, ResolutionList resolutionPath, RegistrationKey keyToResolve) at Reqnroll.BoDi.ObjectContainer.TypeRegistration.<>c__DisplayClass3_0.<ResolvePerContext>b__1() at Reqnroll.BoDi.ObjectContainer.RegistrationWithStrategy.ExecuteWithLock(Object lockObject, Func1 getter, Func1 factory, ResolutionList resolutionPath, TimeSpan timeout) at Reqnroll.BoDi.ObjectContainer.TypeRegistration.ResolvePerContext(ObjectContainer container, RegistrationKey keyToResolve, ResolutionList resolutionPath) at Reqnroll.BoDi.ObjectContainer.RegistrationWithStrategy.Resolve(ObjectContainer container, RegistrationKey keyToResolve, ResolutionList resolutionPath) at Reqnroll.BoDi.ObjectContainer.ResolveObject(RegistrationKey keyToResolve, ResolutionList resolutionPath) at Reqnroll.BoDi.ObjectContainer.Resolve(Type typeToResolve, ResolutionList resolutionPath, String name) at Reqnroll.BoDi.ObjectContainer.<ResolveAll>b__54_1[T](KeyValuePair2 x) at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at Reqnroll.Generator.UnitTestConverter.FeatureGeneratorRegistry..ctor(IObjectContainer objectContainer) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Reqnroll.BoDi.ObjectContainer.CreateObject(Type type, ResolutionList resolutionPath, RegistrationKey keyToResolve) at Reqnroll.BoDi.ObjectContainer.TypeRegistration.<>c__DisplayClass3_0.<ResolvePerContext>b__1() at Reqnroll.BoDi.ObjectContainer.RegistrationWithStrategy.ExecuteWithLock(Object lockObject, Func1 getter, Func1 factory, ResolutionList resolutionPath, TimeSpan timeout) at Reqnroll.BoDi.ObjectContainer.TypeRegistration.ResolvePerContext(ObjectContainer container, RegistrationKey keyToResolve, ResolutionList resolutionPath) at Reqnroll.BoDi.ObjectContainer.RegistrationWithStrategy.Resolve(ObjectContainer container, RegistrationKey keyToResolve, ResolutionList resolutionPath) at Reqnroll.BoDi.ObjectContainer.ResolveObject(RegistrationKey keyToResolve, ResolutionList resolutionPath) at Reqnroll.BoDi.ObjectContainer.Resolve(Type typeToResolve, ResolutionList resolutionPath, String name) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Reqnroll.BoDi.ObjectContainer.CreateObject(Type type, ResolutionList resolutionPath, RegistrationKey keyToResolve) at Reqnroll.BoDi.ObjectContainer.TypeRegistration.<>c__DisplayClass3_0.<ResolvePerContext>b__1() at Reqnroll.BoDi.ObjectContainer.RegistrationWithStrategy.ExecuteWithLock(Object lockObject, Func1 getter, Func1 factory, ResolutionList resolutionPath, TimeSpan timeout) at Reqnroll.BoDi.ObjectContainer.TypeRegistration.ResolvePerContext(ObjectContainer container, RegistrationKey keyToResolve, ResolutionList resolutionPath) at Reqnroll.BoDi.ObjectContainer.RegistrationWithStrategy.Resolve(ObjectContainer container, RegistrationKey keyToResolve, ResolutionList resolutionPath) at Reqnroll.BoDi.ObjectContainer.ResolveObject(RegistrationKey keyToResolve, ResolutionList resolutionPath) at Reqnroll.BoDi.ObjectContainer.Resolve(Type typeToResolve, ResolutionList resolutionPath, String name) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Reqnroll.BoDi.ObjectContainer.CreateObject(Type type, ResolutionList resolutionPath, RegistrationKey keyToResolve) at Reqnroll.BoDi.ObjectContainer.TypeRegistration.<>c__DisplayClass3_0.<ResolvePerContext>b__1() at Reqnroll.BoDi.ObjectContainer.RegistrationWithStrategy.ExecuteWithLock(Object lockObject, Func1 getter, Func1 factory, ResolutionList resolutionPath, TimeSpan timeout) at Reqnroll.BoDi.ObjectContainer.TypeRegistration.ResolvePerContext(ObjectContainer container, RegistrationKey keyToResolve, ResolutionList resolutionPath) at Reqnroll.BoDi.ObjectContainer.RegistrationWithStrategy.Resolve(ObjectContainer container, RegistrationKey keyToResolve, ResolutionList resolutionPath) at Reqnroll.BoDi.ObjectContainer.ResolveObject(RegistrationKey keyToResolve, ResolutionList resolutionPath) at Reqnroll.BoDi.ObjectContainer.Resolve(Type typeToResolve, ResolutionList resolutionPath, String name) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Reqnroll.BoDi.ObjectContainer.CreateObject(Type type, ResolutionList resolutionPath, RegistrationKey keyToResolve) at Reqnroll.BoDi.ObjectContainer.TypeRegistration.<>c__DisplayClass3_0.<ResolvePerContext>b__1() at Reqnroll.BoDi.ObjectContainer.RegistrationWithStrategy.ExecuteWithLock(Object lockObject, Func1 getter, Func1 factory, ResolutionList resolutionPath, TimeSpan timeout) at Reqnroll.BoDi.ObjectContainer.TypeRegistration.ResolvePerContext(ObjectContainer container, RegistrationKey keyToResolve, ResolutionList resolutionPath) at Reqnroll.BoDi.ObjectContainer.RegistrationWithStrategy.Resolve(ObjectContainer container, RegistrationKey keyToResolve, ResolutionList resolutionPath) at Reqnroll.BoDi.ObjectContainer.ResolveObject(RegistrationKey keyToResolve, ResolutionList resolutionPath) at Reqnroll.BoDi.ObjectContainer.Resolve(Type typeToResolve, ResolutionList resolutionPath, String name) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Reqnroll.BoDi.ObjectContainer.CreateObject(Type type, ResolutionList resolutionPath, RegistrationKey keyToResolve) at Reqnroll.BoDi.ObjectContainer.TypeRegistration.<>c__DisplayClass3_0.<ResolvePerContext>b__1() at Reqnroll.BoDi.ObjectContainer.RegistrationWithStrategy.ExecuteWithLock(Object lockObject, Func1 getter, Func`1 factory, ResolutionList resolutionPath, TimeSpan timeout) at Reqnroll.BoDi.ObjectContainer.TypeRegistration.ResolvePerContext(ObjectContainer container, RegistrationKey keyToResolve, ResolutionList resolutionPath) at Reqnroll.BoDi.ObjectContainer.RegistrationWithStrategy.Resolve(ObjectContainer container, RegistrationKey keyToResolve, ResolutionList resolutionPath) at Reqnroll.BoDi.ObjectContainer.ResolveObject(RegistrationKey keyToResolve, ResolutionList resolutionPath) at Reqnroll.BoDi.ObjectContainer.Resolve(Type typeToResolve, ResolutionList resolutionPath, String name) at Reqnroll.BoDi.ObjectContainer.Resolve[T](String name) at Reqnroll.Tools.MsBuild.Generation.GenerateFeatureFileCodeBehindTaskExecutor.Execute()

Steps to Reproduce

  • Migrate SpecFlow project to Reqnroll 2.0.0

             <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
      <PackageReference Include="Reqnroll.ExternalData" Version="2.0.0" />
      <PackageReference Include="Reqnroll.SpecFlowCompatibility" Version="2.0.0" />
      <PackageReference Include="Reqnroll.SpecFlowCompatibility.Actions.Selenium" Version="0.2.6" />
      <PackageReference Include="Reqnroll.xUnit" Version="2.0.0" />
      <PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="139.0.7258.15400" />
              <PackageReference Include="System.Configuration.ConfigurationManager" Version="9.0.8" />
      <PackageReference Include="System.ServiceProcess.ServiceController" Version="9.0.8" />
      <PackageReference Include="System.Text.Json" Version="9.0.8" />
      <PackageReference Include="xunit" Version="2.9.3" />
      <PackageReference Include="xunit.analyzers" Version="1.24.0">
        <PrivateAssets>all</PrivateAssets>
        <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      </PackageReference>
      <PackageReference Include="xunit.runner.visualstudio" Version="3.1.4">
              <PackageReference Include="FluentAssertions" Version="8.6.0" />
      <PackageReference Include="XunitXml.TestLogger" Version="6.1.0" />
    
  • Then update the package to v3.0.0 or higher to use the reporting features

Note: If we exclude the "Reqnroll.SpecFlowCompatibility.Actions.Selenium" from build. Then, I can build the application. But I can't run the application due to missing action configuration and webdriver not found error.

<ItemGroup> <PackageReference Include="Reqnroll.SpecFlowCompatibility.Actions.Configuration" Version="0.2.6"> <ExcludeAssets>build</ExcludeAssets> </PackageReference> </ItemGroup>

Link to Repro Project

No response

9566707474 avatar Sep 11 '25 11:09 9566707474

The "Reqnroll.SpecFlowCompatibility.Actions.*" packages (https://github.com/reqnroll/Reqnroll.Actions) are yet to be updated for v3.

Thanks for noting.

gasparnagy avatar Sep 11 '25 13:09 gasparnagy

@gasparnagy FYI there are some other issues with that repo before we could move to reqnroll3

See https://github.com/reqnroll/Reqnroll.Actions/issues?q=is%3Aissue%20state%3Aopen%20label%3Abuild

304NotModified avatar Sep 12 '25 12:09 304NotModified

How shoud we procceed?

max-stoll avatar Oct 22 '25 06:10 max-stoll

@max-stoll someone would need to update the dependencies of the project in the Reqnroll.Actions repo and the I can make a release for that. Could you please help with that maybe?

gasparnagy avatar Oct 22 '25 09:10 gasparnagy