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

Rename assert skipping functions and add possibility to skip a test completely #161

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JussiPekonen
Copy link

Changes:

  1. The *Skipping functions have been renamed to *SkippingAsserts to highlight that they are related to skipping asserts. The old functions are available for backwards compatibility but they print out a warning that they are deprecated.
  2. The generated report is tweaked to indicate the number of failed test cases (failed tests=X), failed asserts (failed asserts=Y), and skipped asserts (skipped asserts=Z). This will make the generated report convey the number of failures and skipped asserts more clearly than before.
  3. New functionality: function skipTest is introduced that allows all asserts and fails in a test to be skipped. This function must be called in the very beginning of the test case, and if it is called after startSkippingAsserts or any assert/fail function, it will fail the test case. Furthermore, it will print out a warning that the test is skipped, and all asserts and fails in the test case will be skipped without incrementing the assert counters. It will, however, increment a counter for skipped tests, which will be shown in the generated report (skipped tests=X).

The documentation and examples have been updated accordingly.

This new functionality will disable the assert and fail calls for the test
case and it will not increment the asserts counters (total, passed, failed,
and skipped).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant