Open jesseduffield opened 1 year ago
It does seem useful.
Going a step further, could we maybe pack it up into a docker
snapshot and give that to the devs as some sort of core dump?
I mean, this is not for the end user so we can go a little bit the Evil Scientist route here.
Is your feature request related to a problem? Please describe. When an integration test fails, it can be hard to see what went wrong. Although the output will tell at exactly which step the test failed, you still can't really know the cause of failure. Running the same test locally works fine most of the time, but if CI fails and local doesn't, you'll have to do a lot of guesswork.
Asciinema lets you record terminal sessions and save them to .cast files, or to upload them to the asciinema website. We could asciinema to capture test sessions so that it's easy to see what went wrong if a test fails. Here's an example recording
Describe the solution you'd like One possible approach would be the following: any failing integration tests on CI upload their recordings to asciinema and links to the recordings are added somewhere that's easy to find (e.g. as a comment on the PR or somewhere in the CI output).
How this could be done:
headless
mode but instead running it throughasciinema rec
. For example as a proof-of-concept inpkg/integration/components/runner.go
we can go:Additional context
asciinema rec
has a--yes
arg which will automatically upload without prompting the user, but doesn't seem to have an arg for never uploading and always storing locally.