Problem matchers for error messages that span multiple lines
See original GitHub issue- VSCode Version: 1.4.0-insider 01a3f8
- OS Version: Windows 10 x64
I’m unable to get a message built up from several lines in the output. In the output below, I would like the message to contain the spec name, and the reason it failed. Any ideas if this is possible?
I have the following output from NUnit:
Project dotnettesting (.NETCoreApp,Version=v1.0) was previously compiled. Skipping compilation.
NUnit .NET Core Runner 3.4.0
Copyright (C) 2016 Charlie Poole
Runtime Environment
OS Platform: Windows
OS Version: 10.0.10586
Runtime: win10-x64
Test Files
c:\projects\dotnettesting\bin\Debug\netcoreapp1.0\dotnettesting.dll
Errors and Failures
1) Failed : CalculatorSpec.ShouldFail
Expected: 0
But was: 3
at CalculatorSpec.ShouldFail() in c:\projects\dotnettesting\Calculator.spec.cs:line 12
2) Failed : CalculatorSpec.Will_Fail
Expected: 0
But was: 3
at CalculatorSpec.Will_Fail() in c:\projects\dotnettesting\Calculator.spec.cs:line 17
Run Settings
WorkDirectory: c:\projects\dotnettesting
Test Run Summary
Overall result: Failed
Test Count: 3, Passed: 1, Failed: 2, Inconclusive: 0, Skipped: 0
Failed Tests - Failures: 2, Errors: 0, Invalid: 0
Start time: 2016-07-22 19:16:50Z
End time: 2016-07-22 19:16:51Z
Duration: 0.362 seconds
Results saved as c:\projects\dotnettesting\TestResult.xml
SUMMARY: Total: 1 targets, Passed: 0, Failed: 1.
I have configured the following problem matcher:
"pattern": [
{
"regexp": "^\\d+\\) Failed.*$"
},
{
"regexp": "^(.*)$",
"message": 1
},
{
"regexp": "^(.*)$",
"message": 1
},
{
"regexp": "^at (.*\\(\\)) in (.*):line (\\d+)$",
"location": 3,
"file": 2
}
]
Issue Analytics
- State:
- Created 7 years ago
- Reactions:12
- Comments:21 (9 by maintainers)
Top Results From Across the Web
Dec 23, 2020
VSCode already supports multiline problem matchers where the error as a whole is split over multiple lines, so long as no component of...
Read more >VS Code problem matchers: how to extract multiple issues ...
I want to create two problems from this single line, for the two files and line numbers mentioned in the message, so that...
Read more >How to Collect and Manage All of Your Multi-Line Logs
In this post, we will go over strategies for handling multi-line logs so that you can use them to identify and solve problems...
Read more >Getting started with Problem Matchers | michaelheap.com
Multi-line matches ... Problem matchers work on multi-line messages in addition to single line matchers. ... We can see that the first line...
Read more >Manage multiline messages | Filebeat Reference [8.5]
The files harvested by Filebeat may contain messages that span multiple lines of text. ... problems and Regular expression support to avoid common...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The UI work will be useful for this, but yes, there is still Task API that will need to be added.
I need this same functionality (capturing a message across multiple lines). I also have output from my tests like
Expected: 0 But was: 3
that I would like to capture as the ‘message’.