citrusframework / citrusframework/yaks

Optimize failure() condition for pre/post steps

Open
#433 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
90
Forks
28
PR merge metrics
No merged PRs in 30d

Description

Pre/post steps support condition `failure()` which runs the step only on a failed test.

When running a test group with multiple tests the failure() condition is evaluated on the whole test suite. This leads to the situation that the `failure()` condition evaluates to `true` for the whole test suite once a single test has failed. So all succeeding tests will run the steps using the failed condition regardless of the individual test result (success/failed).

We should change that behavior so the pre/post steps that are bound to failure state are run only for failed tests. Succeeding tests without failure should not run the steps in their pre/post script section because of this.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.