-
Notifications
You must be signed in to change notification settings - Fork 212
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
Should there be a counter for skipped tests in addition to the number of skipped asserts? #160
Comments
Can you give us some feedback on this one @kward ? |
After rethinking this a bit, it would make sense to keep the current skipped asserts implementation and refine the generated report to indicate the number of skipped asserts more clearly. That's why I updated the title of the issue. Should the skipped tests feature be implemented, I would suggest the following changes to be made:
|
I am about to get these changes done. Some polishing is still needed before I can make a PR for the changes. The proposal I had in the previous comment had to be tweaked a little. My suggestion for the changes would be the following:
|
Draft PR #161 created for these changes. Feel free to check it out. |
The current
startSkipping
/endSkipping
functionality is all about skipping asserts within the test cases. While that solution can be used for skipping test cases completely, the counter for the "skips" counts the number of skipped asserts instead of skipped test cases. This can lead to situations where the reported number of skipped tests does not match the number of test cases that were skipped.For example, consider a test case
In the end of the generated report, there would be something like "OK/FAILED (skipped=X+2)" where X is the number of other assert skips. Should this test case be the only one to use skipping, the report could be interpreted to include 2 test cases that were skipped.
I would like to open a discussion on the topic. Do you see any benefits of having a skipping mechanism for individual test cases as well? If so, it would benefit from a separate counter that would be reported in the end of the test run. Furthermore, the current skipped counter could be re-used in the report to indicate how many asserts were skipped.
If this gets support, I can do the needed work to get this done.
The text was updated successfully, but these errors were encountered: