Replies: 1 comment
-
@Todaichi looks like you can use https://codecept.io/hooks/#event-listeners as a helper, smth like
will give you access to test object after his execution. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am writing some custom logging, due to our crazy system. I have all of it in place except 1 thing, I can't figure out how to grab the current test in the After hook... neither _after as a helper or After() as a Scenario header. You can pass "test" to a before, but you can't with an After. Any ideas how I can access the current Test?
If running a Break point in the "After" block the debugger gives a reference to a "currentTest" block that has all the information I need, but I can't find a way to access it.
After(async ({I}) => {
if(testPassed)
doThis()
else
DoThat()
});
Beta Was this translation helpful? Give feedback.
All reactions