You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, messages that are shown when tests fail can only be shown at a single Location. Often (connor4312/nodejs-testing#37, #214287 (comment), among others) folks want to see the full call stack of the test failure.
I propose some API to add this information:
declare module 'vscode'{exportclassTestMessage2extendsTestMessage{/** * The stack trace associated with the message or failure. */stackTrace?: TestMessageStackFrame[];}exportclassTestMessageStackFrame{/** * The location of this stack frame. This should be provided as a URI if the * location of the call frame can be accessed by the editor. */file?: Uri;/** * Position of the stack frame within the file. */position?: Position;/** * The name of the stack frame, typically a method or function name. */label: string;/** * @param label The name of the stack frame * @param file The file URI of the stack frame * @param position The position of the stack frame within the file */constructor(label: string,file?: Uri,position?: Position);}}
Reacted by Brad Robinson, Dennis Schmidt, drk-mtr and 大木火
We are using appendOutput() to record all stdout written by tests. In addition, the test.fail() is used to record the failure message and stack for each test failure.
Activity
timheuer commentedon Jun 22, 2024
Connor Peet (@connor4312) does this track that not only the stack but stack + any stdout would show in same UX? /cc Peter Waldschmidt (@peterwald)
connor4312 commentedon Jun 22, 2024
Yes, output is already trackable and associable to a test case via the
run.appendOutputAPIpeterwald commentedon Jun 24, 2024
We are using
appendOutput()to record all stdout written by tests. In addition, thetest.fail()is used to record the failure message and stack for each test failure.connor4312 commentedon Jul 19, 2024
UI: #222126
mjbvz commentedon Aug 12, 2024
Connor Peet (@connor4312) Just check with Joh and this looks good to move into finalized!
connor4312 commentedon Aug 12, 2024
Matt Bierner (@mjbvz) do we want to bundle this with any of the other testing proposals (#212196, #126932)?
testing: finalize test message stack trace API
testing: finalize test message stack trace API (#225517)