Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize failure() condition for pre/post steps #433

Open
christophd opened this issue Aug 25, 2022 · 0 comments · May be fixed by #434
Open

Optimize failure() condition for pre/post steps #433

christophd opened this issue Aug 25, 2022 · 0 comments · May be fixed by #434
Labels
enhancement New feature or request

Comments

@christophd
Copy link
Member

christophd commented Aug 25, 2022

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.

@christophd christophd added the enhancement New feature or request label Aug 25, 2022
christophd added a commit to christophd/yaks that referenced this issue Aug 25, 2022
Make sure to run the pre/post script steps that use condition failure() only on those tests that actually have a failed test result instead of evaluating the failure state for the whole test suite.
christophd added a commit to christophd/yaks that referenced this issue Aug 25, 2022
Make sure to run the pre/post script steps that use condition failure() only on those tests that actually have a failed test result instead of evaluating the failure state for the whole test suite.
christophd added a commit to christophd/yaks that referenced this issue Aug 25, 2022
Make sure to run the pre/post script steps that use condition failure() only on those tests that actually have a failed test result instead of evaluating the failure state for the whole test suite.
christophd added a commit to christophd/yaks that referenced this issue Aug 25, 2022
Make sure to run the pre/post script steps that use condition failure() only on those tests that actually have a failed test result instead of evaluating the failure state for the whole test suite.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant