Skip to content

Conversation

egorshulga
Copy link

Context

Reqnroll has released a new major version - v3 - https://github.com/reqnroll/Reqnroll/blob/main/CHANGELOG.md#v300---2025-08-21.

The release brings some breaking changes. This leads to the need of the following amendments to the Allure-Reqnroll plugin:

  • Reqnroll deprecates and removes synchronous versions of methods - async versions now should be used instead.
  • InitializeTestRunner() is gone from the Reqnroll API.
  • Reqnroll fixes some bugs in published events - which makes some workarounds applied in Allure unnecessary (in fact, they can't function together).

That is my first contribution to this codebase, so I hope I do not break conventions and best practices.

All unit and integration tests in Allure repo are made green - I also have a setup against our project's e2e tests ready for debugging. Let me know what you think and if any changes you would see necessary.

Checklist

@delatrie
Copy link
Contributor

Hi, @egorshulga

Thank you for a nice PR!

May I please ask you to extract the workaround part into a separate PR? We can then release a version that works correctly with Reqnroll 2.4.1 for those who are not yet ready to upgrade to Reqnroll 3.

@egorshulga
Copy link
Author

egorshulga commented Aug 27, 2025

@delatrie Hm, I am not sure these fixes can be backported 🤔

Reqnroll v3 changed the order and the amount of issued events (they fixed some logical inconsistencies - exactly what the workaround were targeting - when some events were not issued in some edge cases). This PR tries to identify these workarounds and only deletes them (the code does not work anymore in their presence).

I am saying that because our main codebase is still on v2.12.1 - and it works (I then assume that all these workarounds are still needed).

I will try now locally to debug their removal in the setup that targets v2.12.1 - but I cannot be sure it will work

@delatrie
Copy link
Contributor

delatrie commented Aug 27, 2025

Reqnroll v3 changed the order and the amount of issued events

I believe they did this in 2.4.1, the latest v2 version they've released. From the release notes:

Fix: Scenario, feature and test run finished event is not published when the related "after" hook fails (reqnroll/Reqnroll#560)
Fix: Inconsistent hook execution (double execution, before/after hook skipped, infrastructure errors) when before or after hooks fail (reqnroll/Reqnroll#526)

And there are definitely some problems with Allure.Reqnroll 2.12.1 and Reqnroll 2.4.1, as when I run tests from Allure.Reqnroll.Tests.Samples, I only see 31 results instead of the expected 35:

dotnet test ./Allure.Reqnroll.Tests.Samples/
allure serve ./Allure.Reqnroll.Tests.Samples/bin/Debug/net8.0/allure-results/

For example, some attachment tests are missing:

image

With Reqnroll 2.3.0, there are five of them:

image

@egorshulga
Copy link
Author

I am checking the project Allure.Reqnroll.Tests.Samples. I can see that the contents of the folder bin\Debug\net8.0\allure-results change with every version of Reqnroll.*:

  • 2.0.3 - 66 files
  • 2.1.0 - 66 files
  • 2.1.1 - 66 files
  • 2.2.0 - 65 files ⚠ Tests from Allure.Reqnroll.Tests do not work either.
  • 2.2.1 - 65 files. But tests from Allure.Reqnroll.Tests work.
  • 2.3.0 - 65 files.
  • 2.4.0 - 65 files.
  • 2.4.1 - 53 files ⚠ Some tests from Allure.Reqnroll.Tests detect that and turn red too.

On branch of this PR (v3.0.0) the amount of files is back to 66 ✅

Indeed, if make the project Samples stay on v2.4.1 AND cherry-pick the changes of HookFinishedEventHandler then the amount of files is also back to 66 ✅

⚠ The not-so-good thing is that on v2.4.1 all tests from Samples are red anyway (although tests from Allure.Reqnroll.Tests are green). Cherry-picking does not help, there is some other incompatibility inside...

@egorshulga
Copy link
Author

egorshulga commented Aug 27, 2025

On Reqnroll v2.4.1, no code cherry-picked from this branch (v3.0.0) - Sample tests statuses are the same as on v2.0.3, but attachments are indeed lost. I assume there is something else going on.

For our project that would be pretty straightforward to upgrade to v3.0.0 (our tests already worked when I apply locally built binaries from this branch). The number of attachments seems also to be fixed.

Should we invest more time into debugging v2.4.1, or just recommend to others to upgrade directly to v3.0.0?

@egorshulga
Copy link
Author

@delatrie please let me know of the steps that we should do here

@delatrie
Copy link
Contributor

delatrie commented Sep 1, 2025

@egorshulga Sure. I've just discovered some flakiness with Allure.Reqnroll that I need to investigate. I will post back as soon as I get some more details.

@304NotModified
Copy link

Any news on this? Could we help in getting things working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Reqnroll v3 AllureApi not working with Reqnroll 2.4.1
3 participants