You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Skipping subsequent tests increases cycle time as it forces multiple test runs to understand all failure cases.
There are cases where multiple related tests may fail for different reasons, and also cases where if test_one fails, it is expected that test_two would also fail, so some sort of toggle to vary the behaviour based on the context would be ideal.
Actual Behavior
test-one runs and fails, then test-two is skipped. I suspect this is deliberate for reasons unknown to me (and not documented), but this behaviour is inconsistent with test failures occurring due to failed assert blocks.
> terraform test
tests/skip-tests-1.tftest.hcl... in progress
run "test_one"... fail
╷
│ Error: Missing expected failure
│
│ on tests/skip-tests-1.tftest.hcl line 9, in run "test_one":
│ 9: azurerm_resource_group.rg
│
│ The checkable object, azurerm_resource_group.rg, was expected to report an error but did not.
╵
run "test_two"... skip
tests/skip-tests-1.tftest.hcl... tearing down
tests/skip-tests-1.tftest.hcl... fail
Failure! 0 passed, 1 failed, 1 skipped.
You can work around this by splitting the tests into different files, but this isn't practical with a large number of tests.
Steps to Reproduce
terraform init
terraform test
Additional Context
No response
References
No response
The text was updated successfully, but these errors were encountered:
Thanks for this feature request! If you are viewing this issue and would like to indicate your interest, please use the 👍 reaction on the issue description to upvote this issue. We also welcome additional use case descriptions. Thanks again!
Terraform Version
Terraform Configuration Files
main.tf:
tests/skip-tests-1.tftest.hcl
Debug Output
N/A
Expected Behavior
Both
test_one
andtest_two
should execute.Skipping subsequent tests increases cycle time as it forces multiple test runs to understand all failure cases.
There are cases where multiple related tests may fail for different reasons, and also cases where if
test_one
fails, it is expected thattest_two
would also fail, so some sort of toggle to vary the behaviour based on the context would be ideal.Actual Behavior
test-one
runs and fails, thentest-two
is skipped. I suspect this is deliberate for reasons unknown to me (and not documented), but this behaviour is inconsistent with test failures occurring due to failedassert
blocks.You can work around this by splitting the tests into different files, but this isn't practical with a large number of tests.
Steps to Reproduce
terraform init
terraform test
Additional Context
No response
References
No response
The text was updated successfully, but these errors were encountered: