reqnroll / Reqnroll

Open-source Cucumber-style BDD test automation framework for .NET.
https://reqnroll.net
BSD 3-Clause "New" or "Revised" License
302 stars 33 forks source link

First attempt: build failure? #122

Closed kwaazaar closed 1 month ago

kwaazaar commented 1 month ago

Reqnroll Version

1.0.0

Which test runner are you using?

xUnit

Test Runner Version Number

2.5.6

.NET Implementation

.NET 6.0

Test Execution Method

Visual Studio Test Explorer

Content of reqnroll.json configuration file

No response

Issue Description

Added new reqnroll testproject, try to run the standard Calculator test from the testexplorer window: "Aborting test due to build failures".

But the build output:

1>ReqnrollFeatureFiles: Features\Calculator.feature
1>-> Using default config
1>ReqnrollGeneratedFiles: Features\Calculator.feature.cs
1>Middleware.Cloud.Reservations.Logic.Tests -> C:\w\git\ireckonu-mwcloud\Middleware.Cloud.Reservations.Logic.Tests\bin\Debug\net6.0\Middleware.Cloud.Reservations.Logic.Tests.dll
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
========== Rebuild completed at 10:26 AM and took 10.035 seconds ==========

Reqnroll output window:

Info: OnActivityStarted: Starting Visual Studio Extension...
Info: CreateProjectScope: Initializing project: Middleware.Cloud.Reservations.Logic.Tests
Info: OnSettingsInitialized: Project settings initialized: .NETCoreApp,Version=v6.0,Reqnroll:1.0.0
Info: ThenImportBindings: 4 step definitions and 0 hooks discovered for project Middleware.Cloud.Reservations.Logic.Tests
Info: ThenImportBindings: 4 step definitions and 0 hooks discovered for project Middleware.Cloud.Reservations.Logic.Tests
Info: ThenImportBindings: 4 step definitions and 0 hooks discovered for project Middleware.Cloud.Reservations.Logic.Tests

Reqnroll logfile does not show any problems. There are many verbose statements and this info statement: 2024-05-10T10:26:38.242+02:00, Info@455, ThenImportBindings: 4 step definitions and 0 hooks discovered for project Middleware.Cloud.Reservations.Logic.Tests

I used SpecFlow a few years back and was hoping to be able to introduce reqnroll at my current customer. But this is not a good start.

Steps to Reproduce

Added new reqnroll testproject, try to run the standard Calculator test from the testexplorer window: "Aborting test due to build failures".

Link to Repro Project

No response

kwaazaar commented 1 month ago

When targeting .NET 8, suddenly it works.

gasparnagy commented 1 month ago

@kwaazaar Strange.

Based on the logs it seems that on Reqnroll side everything is fine: build passes and even VS extension is able to process the step definitions. The error you receive is from the test runner, which should see the Reqnroll project as a standard xUnit project...

This might be even some initial version/fw confusion problem. I sometimes have that with other projects as well.

What happens if you change it back now to .NET 6?

If the issue comes back then please try:

kwaazaar commented 1 month ago

No luck with all those steps. Only when targeting .NET8 it works. However, the tested code does not support .NET 8 (because of old AutoMapper dependency), so I have no way forward now.

gasparnagy commented 1 month ago

@kwaazaar Can you make a zip of your code and attach it here? (I guess it is just the std calculator example, but maybe there is something I can see.)

And one more idea: can you just try to run the tests (with .NET 6) using dotnet test from console?

kwaazaar commented 1 month ago

It's a 400+ projects solution. Cannot provide it. I also dont have the opportunity to take more time for this, so I created regular unittests now.

ajeckmans commented 1 month ago

If and when you have time, can you check of a simple Reqroll project works on your machine?

Also if at all possible can you downgrade xunit to 2.4 and see if that works with .net 6?

gasparnagy commented 1 month ago

@kwaazaar We have just released v2.0.0. You can try with that one, although I still could not reproduce the issue.

I close this ticket now, but if you have new response or feedback about it, feel free to reopen.