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

Support NUnit's test classes out-of-box #365

Open
delatrie opened this issue Jun 19, 2023 · 0 comments
Open

Support NUnit's test classes out-of-box #365

delatrie opened this issue Jun 19, 2023 · 0 comments
Assignees
Labels
task:improvement Change that improves some user experience but can't be considered a new feature theme:nunit

Comments

@delatrie
Copy link
Contributor

Currently, one has to apply the [AllureNUnit] attribute to all their NUnit test classes (test fixtures in NUnit's terminology) in order for them to appear in the report.

The goal is to make this step unnecessary, picking all test fixtures up automatically.

Motivation

It's a part of a larger goal to make allure-nunit usable completely out-of-box. See also #344, where a similar task related to allure-xunit is formulated.

Example

The following usage:

using NUnit.Framework;

namespace MyNamespace;

public class MyTestFixture
{
    [Test]
    public void MyTest(){}
}

should produce the same result, as one with the attribute:

using NUnit.Framework;
using NUnit.Allure.Core;

namespace MyNamespace;

[AllureNUnit]
public class MyTestFixture
{
    [Test]
    public void MyTest(){}
}

Notes

Research is needed on whether it can be achieved and how. Currently, a framework extension mechanism is used to listen test execution events. We should take a closer look at engine extension mechanisms: Creating Engine Extensions. Chances are, one of them (or some combination of them) will suite out needs.

Backward compatibility

The [AllureNUnit] attribute should still be supported, although, obsoleted (it will become a noop basically).

@delatrie delatrie added task:improvement Change that improves some user experience but can't be considered a new feature theme:nunit labels Jun 19, 2023
@delatrie delatrie self-assigned this Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task:improvement Change that improves some user experience but can't be considered a new feature theme:nunit
Projects
None yet
Development

No branches or pull requests

1 participant