-
-
Notifications
You must be signed in to change notification settings - Fork 650
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
Added Duration on GinkgoTestDescription #383
Conversation
Signed-off-by: Eloy Coto <eloy.coto@gmail.com>
@onsi sorry for bothering you, any issue with this PR? Regards |
Hey @eloycoto just making sure I understand the PR in context. Are you doing something like |
Yes! I need the current duration of the test in AfterEach. |
Alright @eloycoto I'm on board with this functionality but I think there's a few things that need to be resolved around this PR. Functionally, I think it is a problem that the runTime here will continue to increase after the test has finished when fetched via
I think this can be resolved by something as simple as:
and then setting
on the spec summary. The other thing I think required here is a test for the behaviour you actually want, which is that:
Because as far as I can see the only test that exists is post-execution. I think it would be fair for this test to live on the GinkgoCurrentTestDescription level, or the Summary level. WDYT about these changes? Thanks! |
I'll work on this in the following days! |
Signed-off-by: Eloy Coto <eloy.coto@gmail.com>
Hi @williammartin this should be ok to review ;-) Sorry, It has been a busy week! |
Alright, hopefully will get round to this shortly now Christmas is over :) |
Signed-off-by: Eloy Coto <eloy.coto@gmail.com>
@williammartin Fixed ;-) |
Cool. Thanks. |
Hello,
This PR adds the support to get the test Duration on the CurrentGinkgoTestDescription(). The main reason is when a test fails you know the current duration of the test.
In my particular case, when a test fails, logs can be retrieved since the test starts. So I don't need to add more verbose in the current test output.
Regards