microsoft / vscode-dotnettools

This is a feedback repository to capture issues logged for the C# Dev Kit and related extensions from Visual Studio Code
Other
228 stars 12 forks source link

Test Runner does not trim method names #295

Closed philipmat closed 11 months ago

philipmat commented 1 year ago

Type: Bug

The Test Runner with C# and Xunit correctly breaks down the tests by Project, then by Namespace, then by class, then, instead of displaying the methods, it display the fully qualified name of the method including namespace and class:

My.Test.Project
+- My.Test.Project.Controllers
     +- SomeControllerTests
        +- SomeMethod (expected)
        +- My.Test.Project.Controllers.SomeControllerTests.SomeMethod (actual)

This makes it difficult to read: image

Extension version: 0.2.100 VS Code version: Code 1.80.1 (74f6148eb9ea00507ec113ec51c489d6ffb4b771, 2023-07-12T17:20:58.115Z) OS version: Darwin arm64 22.5.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M1 (8 x 24)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|1, 2, 2| |Memory (System)|16.00GB (0.05GB free)| |Process Argv|--crash-reporter-id 02851b3f-424b-4669-a292-4b127e79774d| |Screen Reader|yes| |VM|0%|
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263cf:30335440 vscorecescf:30445987 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 pythonvs932:30410667 vsclangdf:30486550 c4g48928:30535728 dsvsc012cf:30540253 pynewext54:30695312 azure-dev_surveyone:30548225 2e4cg342:30602488 89544117:30613380 a9j8j154:30646983 showlangstatbar:30737416 vsctsb:30748421 03d35959:30757346 ecj1e332:30736112 pythonfmttext:30731395 pythoncmv:30756943 fixshowwlkth:30771522 showindicator:30785052 pythongtdpath:30769146 i26e3531:30792625 pythonnosmt12:30779714 pythonidxpt:30784022 pythonnocebcf:30776496 e537b577:30795824 dsvsc013:30795093 ```
timheuer commented 1 year ago

Thanks for the repor @philipmat I see that MSTest and NUnit trim but bUnit/xUnit do not. Will have a look into it.

FYI dev team - simple repo https://github.com/timheuer/TestSolution

image

peterwald commented 11 months ago

Fixed in #533