Incorrect test filter generated for test in nested class with dotnettest
Nobody has claimed this yet.
- Dominant language
- Vim Script
- Stars
- 3.2k
- Forks
- 411
- Avg merge
- 1h 30m
- Merged PRs (30d)
- 5
Description
In a C# project with xUnit, and the runner configured like so: let test#csharp#runner = 'dotnettest', running TestNearest generates an incorrect test filter when dealing with tests contained in nested classes.
Running dotnet test --list-tests yields the format:
MyNamespace.MyClass+MyNestedClass.MyTestMethod
though vim-test generates the following filter:
FullyQualifiedName=MyNamespace.MyClass.MyNestedClass.MyTestMethod
The difference being the usage of . versus + as the separator for nested classes. As a result, the specified tests fails to be found with the generated test filter.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the TestNearest path for the dotnettest runner and compare its generated filter with the names returned by dotnet test --list-tests. Done means nested xUnit test names use + between the containing class and nested class so the specified test is found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, vim
- Domain
- testing, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100