Skip to content

Tests in derived class with InheritsTests attribute have the source listed as the placement of InheritsTests instead of the actual test itself #3055

@Rekkonnect

Description

@Rekkonnect

Version

0.57.24

Sample code

public abstract class BaseTest
{
    [Test]
    public async Task SimpleTest()
    {
        await Assert.That(Environment.ProcessorCount).IsGreaterThan(0);
    }
}

[InheritsTests]
public sealed class DerivedTest : BaseTest
{
    [Test]
    public async Task ExtraTest()
    {
        await Assert.That(Environment.ProcessorCount).IsGreaterThan(0);
    }
}

Both tests' sources are listed as the placement of InheritsTests instead of the corresponding Test attribute for each of the tests.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions