I am attempting to put the custom method, that would send results of automated tests to JIRA, in the Behave's environment.py
. It would be in after_scenario()
or after_feature()
. So I want it to send the results to JIRA after closing tests.
It seems that those methods in environment.py
only take in the methods that are part of context
class. Is that right? Is there any walkaround this issue?
The methods are expected to have precise names and arguments, as seen in Behave's API reference. However, nothing prevents you from calling your own method within these hooks.
Something like this:
def after_feature(context, feature):
send_feature_results_to_jira(context, feature)