-
Notifications
You must be signed in to change notification settings - Fork 213
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
Add Line number qualifier to test.suite.path #2202
Comments
We should be able to do that, given we support running tests by line/col. Note that the logic isn't always perfect for which line/col we would report, in particular if you are wrapping your calls to |
cc @natebosch thoughts on how we would roll this out? |
I think we also don't collect the file location unless we're using the JSON reporter or some other feature which uses it. Adding to the expanded or github reporters will add some amount of overhead to collect the file locations when we otherwise would have skipped it. I don't think that should be much of a problem. I think rolling it out to the GitHub reporter is unlikely to break anyone, and should be safe to do. There is more risk in changing the expanded reporter format, but given that we've had a machine readable format already available I think I'd be OK risking breaking projects that are parsing the expanded reporter output.
Slight nitpick - this will let us find the start of the test that failed, not the specific line within the test that caused the test to fail. I think overall this would be a fine change to make. I think we've also had a request to add more fine-grained timing information to the expanded reporter. |
Yeah, the expanded/compact reporter formats while used by some tools are not supported for that use, so I think we should feel free to change it.
We could possibly show the exact line for any failed expectation too? |
I think we make an attempt at that in the stack trace. I think it's currently hardcoded to support |
Yeah true, so what value is this providing then really? It does let you jump right to any test (failed or not), but non-failures aren't as interesting. |
Currently the reporter (expanded or github) spits up only the path of the file under test rather than the full qualifier i.e.
<Path-to-file>:<line>:<column>
This would enable editors like intellij to autolink it to the exact line that failed instead of having to manually scroll through the file.
Current Behaviour
Expected Behaviour
The text was updated successfully, but these errors were encountered: