-
Notifications
You must be signed in to change notification settings - Fork 118
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 post-run hook to support sending desktop notifications #74
Comments
When I use these I tend to have my editor window focused, and my terminal running tests hidden - so ideally the notification should get enough data exposed to be able to include some details about the failure:
|
Started some work in #76 which I think would enable a basic notification. File and line numbers is not something that is currently parsed. Test names are easy enough, but the file and line numbers are for the failed asserts/checks not for the tests cases themselves. |
I had a little play around with this, had to switch to a shell exec to be able to handle multiple arguments to the hook command well: |
Thanks for your work on this! I've merged the original PR which adds the new command line flag, and opened #116 for possible next steps. I'll also open a PR now for adding it to the documentation in the next release. |
Thanks to @glenjamin for the idea.
Instead of publishing notifications directly I'd like to add support for executing a script that is passed all of the necessary details, and can handle any type of notification.
The script should be called with env vars which contain a summary of the run, and a json blob could be passed to stdin to provide full details about any errors.
Such a feature might look something like this:
Env vars:
I'm not sure how to encode more details. The junixml format might work, but is probably not the easiest format to integrate. A custom JSON document might work but will be more involved to maintain.
Maybe env vars will work for the first version.
The text was updated successfully, but these errors were encountered: