Closed
Description
openedon May 17, 2019
My use case:
- At the end of each test, save a video of the test in a file.
- It has to support the
@RepeatedTest
annotation and thus the computed file name must include the repetition index.
It seems the info is in RepeatedTestInvocationContext but there are 2 issues:
- I don't know how to get access to that object in my afterEach, i.e. from an ExtensionContext. I guess I could use instanceof on the parent but it seems it's a TestTemplateExtensionContext so it wouldn't even work (and it feels hacky ;))
- Even if I were able to get access to RepeatedTestInvocationContext it doesn't contain any API to get the current repetition. The only thing it offers is a custom displayName but having to parse that to get the repetition index doesn't feel right.
Related Issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment