Skip to content
This repository has been archived by the owner on Jan 18, 2025. It is now read-only.

Feature request: test results as a notification #268

Open
slowteetoe opened this issue May 3, 2023 · 1 comment
Open

Feature request: test results as a notification #268

slowteetoe opened this issue May 3, 2023 · 1 comment
Labels

Comments

@slowteetoe
Copy link

Apologies if this has been asked, but I was wondering if there was a way to report the status of tests via a notification?

If I'm developing in a TDD style, I usually have some flavor of cargo watch -x test running in the background.

It would be great if there was a way to report red (tests failing) or green (test passing) through the desktop notifications.

It seems like the plumbing is there, since --notify pops up a notification every time there's a change, maybe just a way to react to the exit status? i.e. 0=green, >0=red?

@passcod passcod added the feature label May 3, 2023
@apiraino
Copy link

apiraino commented Jan 5, 2024

@slowteetoe which OS are you using? I am on Linux and my hand-made way of reporting when a compile ends is:

cargo-watch -x build -s '/usr/bin/notify-send "Compile result" DONE'

Stuff in -s is executed after the process ends and (IIUC) only when cargo exits with success. I assume that with a bit of scripting you should be able to wrap cargo-watch and write your own custom reporting notification that also handles the case where the command exited with an error code (f.e. one test failed)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants