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

Is there a way to adjust the "Class" property after test execution #848

Open
bernd5 opened this issue Apr 23, 2021 · 3 comments
Open

Is there a way to adjust the "Class" property after test execution #848

bernd5 opened this issue Apr 23, 2021 · 3 comments
Labels
External Tracked here, but must be fixed in external tool is:question ReportedToMS VS Issue

Comments

@bernd5
Copy link

bernd5 commented Apr 23, 2021

Hello,
I'd like to adjust the "Class" or some other column in VS Test Explorer after test execution with a simple text:
grafik

I would like to see there something like the exception class (FeatureXYZNotImplementedException). The text should be adjustable.

My tests are based on [TestCaseSource(nameof(TestFiles))].

The main reason for this is that I want to get more outcome states: not just "fail" and "pass".

@OsirisTerje
Copy link
Member

I am not sure I understand what you're looking for. You can tweak the reported names to a certain degree using the name formats, see Tricks and Traps in the adapter docs, but otherwise we don't control how the test explorer UI displays the tests.

@bernd5
Copy link
Author

bernd5 commented Apr 24, 2021

As you know, I use very much the TestCaseSource - which is super great.
What I want now is some way to report more information as just "pass" or "fail" to the test explorer depending on the test outcome / test result. I can't fill it during test discovery.

So I would like to write for example:

TestContext.CurrentContext.Test.ClassName = "MyClass";

Any other column is okay, too. It should just be sortable in VS. Is there any way to achieve this?

What I tried already:
I replaced the TestAdapter class and changed the reflection based class property. But the data is not reported/copied back to VS.

I opened an issue at developercommunity.visualstudio.com, too.
https://developercommunity.visualstudio.com/t/extension-for-test-explorer-error-category/1402579?from=email&viewtype=all#T-ND1405969

@OsirisTerje
Copy link
Member

I see your point, it's a good idea. And I think we need the changes first in Test Explorer and its interface, then it should be doable from the adapter/framework. I upvoted your devcom issue :-)

@OsirisTerje OsirisTerje added External Tracked here, but must be fixed in external tool ReportedToMS VS Issue labels Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External Tracked here, but must be fixed in external tool is:question ReportedToMS VS Issue
Projects
None yet
Development

No branches or pull requests

2 participants