-
Notifications
You must be signed in to change notification settings - Fork 65
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
Allure.Xunit improvements #461
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
delatrie
force-pushed
the
xunit-fixes-2403
branch
3 times, most recently
from
March 27, 2024 23:30
6c80232
to
cd79480
Compare
delatrie
force-pushed
the
commons-fixes-2403
branch
from
March 28, 2024 10:50
efc568a
to
61705d9
Compare
delatrie
force-pushed
the
xunit-fixes-2403
branch
from
March 28, 2024 10:50
cd79480
to
2e60f5e
Compare
delatrie
force-pushed
the
commons-fixes-2403
branch
from
March 28, 2024 13:20
61705d9
to
0a561ad
Compare
delatrie
force-pushed
the
xunit-fixes-2403
branch
from
March 28, 2024 13:27
2e60f5e
to
7bd444d
Compare
epszaw
approved these changes
Mar 28, 2024
- using-style steps/fixtures: - Allure.Xunit.AllureBefore - Allure.Xunit.AllureAfter - Allure.Xunit.AllureStep - Allure.Xunit.AllureStepBase - Async attachment functions in Allure.Xunit.AllureAttachments - Unused internal methods of AllureXunitHelper that had accidentally leaked into public API: - StartTestContainer - StartTestCase - MarkTestCaseAsFailedOrBroken - MarkTestCaseAsPassed - MarkTestCaseAsSkipped - FinishTestCase - The Allure.Xunit.Steps class - AllureXunitAttribute and AllureXunitTheoryAttribute (not used anymore)
Now, it only considers assemblies with names matching the *reporters* pattern.
delatrie
force-pushed
the
xunit-fixes-2403
branch
from
March 28, 2024 16:26
7bd444d
to
d3165f4
Compare
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Namespace consolidation
Previously, Allure.XUnit mixed two namespaces:
Allure.XUnit
andAllure.Xunit
. This PR consolidated the namespace toAllure.Xunit
(as the xUnit.net itself usesXunit
). Users should adapt their code accordingly:Allure.XUnit.Attachments
->Allure.Xunit.Attachments
Allure.XUnit.Attributes.Steps.AllureAfterAttribute
->Allure.Xunit.Attributes.Steps.AllureAfterAttribute
Allure.XUnit.Attributes.Steps.AllureBeforeAttribute
->Allure.Xunit.Attributes.Steps.AllureBeforeAttribute
Allure.XUnit.Attributes.Steps.AllureStepAttribute
->Allure.Xunit.Attributes.Steps.AllureStepAttribute
Allure.XUnit.Attributes.Steps.NameAttribute
->Allure.Xunit.Attributes.Steps.NameAttribute
Allure.XUnit.Attributes.Steps.SkipAttribute
->Allure.Xunit.Attributes.Steps.SkipAttribute
Note
All Allure.Xunit attributes not explicitly listed above were already in the correct namespace from the start.
The
Allure.XUnit
namespace is still in place. Accessing it will produce a deprecation warning.API deprecations and removals
The following API was removed:
[AllureStep]
/[AllureBefore]
/[AllureAfter]
,AllureApi
, orExtendedApi
instead):AllureApi.AddAttachment
instead).[Fact]
and[Theory]
instead.The PR hides the following API that wasn't meant to be public in the first place:
The second reporter resolution
If the
xunitRunnerReporter
option is set toauto
(the default) or to a reporter's name, the reporter resolution process kicks in. It used to scan too many assemblies from the domain. While some filters have been in place, there needed to be more as errors like #412 occur occasionally.The new resolution algorithm applies an extra filter: an assembly must have
*reporters*
in its name. It gradually reduces the number of assemblies to scan while is in line with how recent versions of xUnit.net try to find a reporter (see here).Target framework change
Allure.Xunit now targets netstandard2.0 and netcoreapp3.1. The main driver to increase the netcoreapp version is [CVE-2021-26701](https://www.cvedetails.com/cve/CVE-2021-26701/).
Due to how xUnit.net manages its packages, that change means we support the following frameworks:
All other frameworks might be supported except the following (which are not):
net35;net452;netstandard1.1;netstandard1.5;netcoreapp1.0
resolves it to something other thannetstandard1.5
. That's the general rule. The two above cases are just special cases of it.Other Changes
[Theory(Skip = "...")]
(fixes xUnit.net: False missing arguments warning if [Theory(Skip = "...")] is used #421)