get test title in After() or Scenario() #3662
-
Is there a way to access Test title in After() or at least in Scenario()? I'm sending requests to API in scenarios, so would like to have a copy of sent request to be saved as file name %Scenario%.json |
Beta Was this translation helpful? Give feedback.
Answered by
myrepojuly1987
May 12, 2023
Replies: 1 comment 9 replies
-
I think those would help https://codecept.io/internal-api/#event-listeners |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@adudyak - You mean how to call the test title inside the test scenario? You can try something like below
Then in your test file,
I don't think we the below is required in the
codecept.conf.js
. You can remove it, if the above works. Please test it.