vscode-rust-test-adapter icon indicating copy to clipboard operation
vscode-rust-test-adapter copied to clipboard

Capture test failure details

Open calebcartwright opened this issue 6 years ago • 7 comments

Capture the output of failed tests make it available on each test node in the explorer

calebcartwright avatar Jan 01 '19 21:01 calebcartwright

This is still the next major focus area, we just need to finish #14 ASAP

calebcartwright avatar Oct 17 '19 03:10 calebcartwright

My guess is that one depends on #43. You cannot split stdout in multi thread tests without leverage on cargo json output format.

la10736 avatar Nov 04 '19 12:11 la10736

My guess is that one depends on #43. You cannot split stdout in multi thread tests without leverage on cargo json output format.

I'm still confident that we can support extracting test failure content from the default pretty format, though json would obviously be far, far easier! I'm hoping that the json format option will be stabilized soon

calebcartwright avatar Nov 04 '19 15:11 calebcartwright

--message-format json should be stable https://doc.rust-lang.org/cargo/commands/cargo-test.html

I missed something?

la10736 avatar Nov 04 '19 15:11 la10736

You need to use the --format option that's passed to the test binary, which is different than --message-format used with cargo and subcommands.

cargo test -- --format json, and json is not yet stabilized there.

AFAIK, cargo test --message-format json does not actually emit the test results in json format

calebcartwright avatar Nov 04 '19 15:11 calebcartwright

Sorry... I saw what I missed...

cargo test -- -Z unstable-options --format=json

AFAIK, cargo test --message-format json does not actually emit the test results in json format Right

My falut sorry.

Anyway on intellj they already use it and maybe it will never change... Anyway I wasn't able to find the ticket that track stabilization :(

la10736 avatar Nov 04 '19 16:11 la10736

No worries! We're (tentatively) planning on implementing this with the default/stable pretty format to ensure we can do the basics with stable-only options, and then shifting focus to the json format

calebcartwright avatar Nov 04 '19 16:11 calebcartwright