Closed asashour closed 7 months ago
No, for a couple of different reasons.
Cypress doesn't offer try-catch, making this difficult / impossible.
Furthermore, you should code expectations in your test even if it's a negative expectation. This way you don't allow arbitrary and unintended errors through.
Lastly, the goal of this project is to maintain feature parity with cucumber-js. As this doesn't exist there, it likely won't here either.
Problem
When a test is correctly written, but the application implementation is not done ready, there is no current best way to commit that test scenario.
Suggestion
Have a
@failing
tag, which reverses the result of the test.So if the implementation fails (as expected), the build is green. And if the implementation succeeds (unexpectedly), the build is red saying "the test is expected to fail, but passes".
This would allow the tester to write down test cases and mark them as @failed, till the implementation is done, and the tag would then be required to be removed.
And by searching for the
@failed
tests, the development team can look for the missing unimplemented scenarios to be implemented.Other current solution
@skip
: although it is an option, but the test would be always ignored, so it loses the benefit of knowing whether it fails (as expected), or the test now should pass and the@skip
should be removed.