Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upTracking issue for libtest JSON output #49359
Comments
sfackler
added
B-unstable
T-dev-tools
labels
Mar 25, 2018
XAMPPRocky
added
A-testsuite
C-tracking-issue
labels
Jun 29, 2018
ehuss
referenced this issue
Oct 7, 2018
Open
Fail or warn when using an overrestricitve test filter that filters all tests #6151
This comment has been minimized.
This comment has been minimized.
johnterickson
commented
Feb 21, 2019
|
@nrc You mentioned "The long-term solution is going to be deeply intertwined with pluggable test runners" in #46450. Does that mean that JSON won't be stabilized until there are pluggable test runners? I'm trying to figure out if it makes sense for me to continue looking at #51924 right now, or if I should hold off for the time being. For example, I'm looking at adding test durations to the JSON (master...johnterickson:testjson) and converting the output to JUnit (https://github.com/johnterickson/cargo2junit/). |
This comment has been minimized.
This comment has been minimized.
|
Yeah I think we should stabilize something like this independently of custom test frameworks. It makes sense that the included test framework would have a programmatically readable output. Libtest's conceptual model is pretty simple and most likely won't undergo any drastic changes so I'm all for stabilizing something. I'd prefer to have a JSON Schema that describes the structure before stabilization. We'd also need to audit to ensure it's resilient to any minor changes or additions over time. @alexcrichton thoughts? |
This comment has been minimized.
This comment has been minimized.
|
Seems like a plausible addition to me! So long as it's designed careful I think it'd be good to go |
This comment has been minimized.
This comment has been minimized.
epage
commented
Feb 27, 2019
|
From the experience of creating naiive serde structs / enums for libtest's output, here are my thoughts from translating it exactly how it is written in libtest (rather than inventing my own schema that happens to be compatible):
My PR where you can see the data structure's I created: https://github.com/crate-ci/escargot/pull/24/files Ideas to consider
|
This comment has been minimized.
This comment has been minimized.
|
I think it's worth adding things like package and type of test. Type of test: unit test, doc test, integration test. The package is something like: module for unit test, resource path for doc test (crate::foo::Bar), and filename for integration test. |
This comment has been minimized.
This comment has been minimized.
epage
commented
Mar 4, 2019
|
Since libtest tracks test times (at minimum, reporting if its taking too long), it would be nice if that got included in the programmatic output so we can report it to the user, e.g. in JUnit. Alternatively, we'd have to timestamp the events as we read them. |
Gilnaa commentedMar 25, 2018
Added in #46450
Available in nightly behind a
-Zflag.