Skip to content

Commit f318470

Browse files
authored
Merge pull request #9 from sourav-kundu/patch-1
Added test marking executor code in after hook
2 parents a9e19ba + ce94de7 commit f318470

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

features/environment.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,9 @@ def before_feature(context, feature):
4343
)
4444

4545
def after_feature(context, feature):
46+
if context.failed is True:
47+
context.browser.execute_script('browserstack_executor: {"action": "setSessionStatus", "arguments": {"status":"failed", "reason": "At least 1 assertion failed"}}')
48+
if context.failed is not True:
49+
context.browser.execute_script('browserstack_executor: {"action": "setSessionStatus", "arguments": {"status":"passed", "reason": "All assertions passed"}}')
4650
context.browser.quit()
4751
stop_local()

0 commit comments

Comments
 (0)