Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First attempt: build failure? #122

Closed
kwaazaar opened this issue May 10, 2024 · 7 comments
Closed

First attempt: build failure? #122

kwaazaar opened this issue May 10, 2024 · 7 comments
Labels
cannot reproduce We could not reproduce the problem

Comments

@kwaazaar
Copy link

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 kwaazaar added the bug Something isn't working label May 10, 2024
@kwaazaar
Copy link
Author

When targeting .NET 8, suddenly it works.

@gasparnagy
Copy link
Contributor

@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:

  • Clean bin & obj folders and try to rebuild it from scratch
  • Restart VS
  • Check the "Tests" output pane of VS, maybe there is some useful info there
  • Check if there are any new package versions of the test related packages of the project

@kwaazaar
Copy link
Author

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
Copy link
Contributor

@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
Copy link
Author

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
Copy link
Contributor

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
Copy link
Contributor

@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.

@gasparnagy gasparnagy added cannot reproduce We could not reproduce the problem and removed bug Something isn't working labels May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cannot reproduce We could not reproduce the problem
Projects
None yet
Development

No branches or pull requests

3 participants