Skip to content
\n

Nothing special... I've also environment.py with below after_feature definition:

\n
def after_feature(context, feature):\n    f = open(\"mlog.txt\", \"a\")\n    f.write(f\"feature status: {feature.status} err msg: {feature.error_message} \")\n    for fs in feature.final_status:\n        f.write(f\"{fs.name}: {fs.value}\\n\")\n    f.close()
\n

Sounds simple... now, when I'm running behave --tags=wip which should skip the first scenario and execute only the second one (outline) two times, I'm getting summary as expected:

\n
1 feature passed, 0 failed, 0 skipped\n2 scenarios passed, 0 failed, 1 skipped\n6 steps passed, 0 failed, 3 skipped, 0 undefined\nTook 0m0.000s\n
\n

but in the mlog.txt file I'm getting something surprised me:

\n
after tag: wip\nfeature status: Status.passed err msg: None\npassed: 2\nfailed: 3\nskipped: 1\n
\n

The question is:

\n","upvoteCount":1,"answerCount":3,"acceptedAnswer":{"@type":"Answer","text":"

Not quite:

\n","upvoteCount":0,"url":"https://github.com/behave/behave/discussions/1198#discussioncomment-10644563"}}}

Using Feature.final_status (or better not) #1198

Discussion options

You must be logged in to vote

Not quite:

  • final_status is a constant class-attribute of a Feature base-class
  • final_status is basically a list of Status enum-values that indicate that the model-element (in this case the Feature) has reached a final state. Therefore, it is the subset of Status enum-values that have the final „property“ (and should not change afterwards in the test run).

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@jenisys
Comment options

Answer selected by jenisys
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants