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

Include className in output #14

Open
AlexZeitler opened this issue Jul 4, 2024 · 4 comments
Open

Include className in output #14

AlexZeitler opened this issue Jul 4, 2024 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@AlexZeitler
Copy link

AlexZeitler commented Jul 4, 2024

Thanks for creating this project, it makes test results much more readable.

I'm using NUnit this way:

namespace SomeTests;

[TestFixture]
public class When_something_is_done() {
  [Test]
  public void something_should_happen() { }
}

The <TestMethod> output for this looks like this:

<TestMethod codeBase="/path/to/Some.Tests.dll"
                        adapterTypeName="executor://nunit3testexecutor/" 
                        className="SomeTests.When_something_is_done"
                        name="something_should_happen"/>

It would be great if there was an option to include className (maybe without the namespace) in the report and group tests from within the class.

I didn't do any work related to TRX so far but I would be willing to send a PR if you don't want to do it but are open to it in general.

Back this issue
Back this issue

@kzu
Copy link
Member

kzu commented Jul 6, 2024

I'm totally open, yeah! Thanks for chiming in. I think grouping would be great. In the console, we could use a treeview from SpectreConsole with a root node for the assembly name (just filename, I'd say), then class name, finally test name. And make it smart by default such that:

  • If class name starts with assembly name, remove that common prefix
  • If test name starts with class name/assembly name, remove that common prefix

This would by default render the shortest entry at each level. The assembly name perhaps should also be just a relative path like I render now via relative links to file paths...

@AlexZeitler
Copy link
Author

Yes, that sounds good!

@AlexZeitler
Copy link
Author

Just to make sure we’re on the same page: I’ll send you a PR?

@kzu
Copy link
Member

kzu commented Jul 12, 2024

Yeah, go ahead! I made some changes in the past couple days, but mostly just for GH reporting, not the main console output.

@kzu kzu added good first issue Good for newcomers help wanted Extra attention is needed enhancement New feature or request labels Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants