microsoft / microsoft/vscode-dotnettools

Improve navigating test failure call stacks

Open
#2,129 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area-test enhancement
Dominant language
No language data
Stars
321
Forks
54
Avg merge
2d 19h
Merged PRs (30d)
2

Description

Originally filed by @eylvisaker at https://github.com/dotnet/vscode-csharp/issues/8379

Is your feature request related to a problem? Please describe.

I am frequently frustrated when I'm running tests in VSCode and I click on a failed test and it goes to the very top of the callstack where the failure occurred. I often have assertion helper methods with names like VerifyParagraph() that help simplify writing tests by collecting common behaviors. Although the asserts exist within these method, the test problems almost never occur there, and landing in this method just does not provide helpful context. Often times a reason for a test failure does not occur in the same location as the exception was thrown, but having VSCode constantly push me to the line of the exception is really disruptive to my flow.

(For clarification: I'm using top of the call stack to refer to the function where the exception was thrown, and bottom of the call stack to refer to the entry point of the test method)

Describe the solution you would like

What I actually want is to have more precise control over navigating the call stack for a test failure. This should include the following:

  • There should be an option somewhere that allows me to configure whether clicking on a failed test in the test explorer goes to the top or bottom of the call stack. (IMHO this should default to the bottom of the callstack, not the top)

  • Clicking on a failure marker :
    Image
    This should not adjust my position at all. It should just open the display of the callstack so I can read it. Currently clicking on this navigates to the top of the callstack, but when I click on this I want the details of the failure, not to navigate through the source.

  • The inset that shows test failure details:
    Image
    ** The arrow buttons in the top right allow me to navigate between different test failures, which is redundant with the list of test failures that are right below. What's missing from here is a way to navigate up and down the call stack - this would be really useful.
    ** The button to navigate to the bottom of the call stack is buried in the content, a long exception message pushes that off the bottom requiring scrolling down to reach it.
    ** There is no word wrap here, so long exception messages or source lines are hidden under the right pane. There is no horizontal scrollbar either, so I can only see long messages by clicking into the box and then navigating with the keyboard.

Applicable Scenarios

Test failures that occur in a dotnet project.

Describe alternatives you've considered

Using Rider. I like VSCode for everything else, but this is maddening.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No implementation files or tests are named. Reproduce the behavior in the VS Code test explorer for a dotnet project, then trace the existing failure marker and test failure details views. Done should cover configurable top or bottom navigation, non-navigating failure markers, call-stack controls, and usable wrapping or scrolling for long details.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
devtools, testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.