Skip to content
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

Message for Notifying about Hooks/Non-Tests #4087

Open
thomhurst opened this issue Nov 20, 2024 · 0 comments
Open

Message for Notifying about Hooks/Non-Tests #4087

thomhurst opened this issue Nov 20, 2024 · 0 comments

Comments

@thomhurst
Copy link
Contributor

Summary

A new message that can publish information about hooks/Non-Tests

Background and Motivation

Currently if a hook fails, I have two options:

  • attach the failure to an existing test node
  • create a dummy test node to represent the hook

Those problems with these are, respectively:

  • this implies the test failed which isn't the case, and it also complicates code bases more as the test object must be kept around for longer, and also timings. Do I count hook timings in the test that triggered it? Ideally no, it would have its own object with it's own timing.
  • dummy test nodes are reported as new tests, and would then show under the test counters at the end, and IDEs would show them as runnable tests.

Proposed Feature

A new message to represent hooks would be nice.

It would simplify my logic as I wouldn't have to keep test objects around for longer and delay their result publishing until hooks had finished.

Optionally, supplying a property of test IDs to them could represent what tests they relate to/trigger from. These could be used to drive IDE uis if they wanted to build something to show hook execution.

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

No branches or pull requests

1 participant