formulahendry / formulahendry/vscode-dotnet-test-explorer

Run inherited tests with codelens

Open
#336 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
208
Forks
93
PR merge metrics
No merged PRs in 30d

Description

There's an [existing issue](https://github.com/formulahendry/vscode-dotnet-test-explorer/issues/215) concerning inheritance, but that no longer applies as omnisharp has been improved since then. I think that issue should be closed in favor of this one.

Assume we have a test class that inherits tests from a base class.
````cs
public abstract class Base {
[Fact] public void test1() { }
[Fact] public void test2() { }
}

public class Concrete : Base {
}
````

This works correctly with the Test Explorer: inherited tests are shown, and can be run.

However there are issues with Codelens:
- The inherited tests are not run from codelens, when using `Run All Tests` on the subclass
- If the subclass does not have its own tests (marked `Fact` or `Theory` for xUnit, or equivalent for NUnit) then the `Run All Tests` codelens item does not show at all

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.