-
How to get failed step/scenario errors in variable at Environment file? I want to print errors/logs/exception message that we get during run time to be printed in Environment.py. How do i get errors for failed tests accessible from I need this error message in after step/scenario so that I can send it to TestRail and update Testcase Run results. # — FILE: features/environment.py
def after_step(context, step):
pass # Details left out here.
def after_scenario(context, scenario):
pass # Details left out here.
FYI: I have used formatter and published HTML report having attachment/debug/runtime logs. I am not talking about this. |
Beta Was this translation helpful? Give feedback.
Answered by
jenisys
Sep 19, 2023
Replies: 1 comment
-
@jigisha9
ALTERNATIVE:
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jenisys
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@jigisha9
As already stated:
Formatter
Formatter
is a extension-point inbehave
. Therefore, you can provide your ownstdout
as output destination. The other should write to files or send messages somewhere else or …ALTERNATIVE:
JUnitXML
orJSON
output and apply a post-processor that transforms the test-run information to your other test tool (test case management system, test database, …)