-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Issue #21 Alternative Version with AssertionError hierarchy #25
Open
mmichaelis
wants to merge
10
commits into
ota4j-team:main
Choose a base branch
from
mmichaelis:issue-21-assertionerror-alternative
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Issue #21 Alternative Version with AssertionError hierarchy #25
mmichaelis
wants to merge
10
commits into
ota4j-team:main
from
mmichaelis:issue-21-assertionerror-alternative
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Introducing a more generic way to provide additional information for debugging upon assertion failures. The DebugInformation is key-value based and can contain actual any information. In addition to this extended the ValueWrapper (now renamed to ValueDescriptor as it *describes* the value) so that it does some effort to serialize objects applying some strategies. This way we could also provide images as for example for UI tests. The current state neither includes documentation, more tests and misses the commonly used exception for all exceptions provided inside here. This approach also addresses issues: * ota4j-team#20 support for exception creation strategies * ota4j-team#4 detach AssertionError from exceptions here * ota4j-team#9 partially, as you the debug information provided here should eventually merge into a standard test report.
Experience shows that you cannot even trust toString() of objects. They sometimes fail with an exception. ValueDescriptor should be robust against such behavior.
* Introduces DebuggableException as base for all exceptions which should provide debug information. * Makes AssertionFailedException a DebuggableException Keeps actual/expected constructors for now. * MultiFailuresException: Adjust newline to system line.separator * Repackages DebuggableException-classes * Introduces test helpers like for serialization and to do assertions on exceptions.
* Refactored ExceptionTestHelper to provide better/easier to understand support for testing DebuggableExceptions. * Introduces test for DebuggableException * Renames methods of DebugInformation to be similar to Map interface.
* Provide a lot more tests. * Remove unused methods from AssertionFailedException about actual/expected.
Adjust Javadoc as the statements about actual/expected values are not valid anymore.
As the decision about ota4j-team#4 is not yet clear and some points (support of old frameworks/tests) this is an alternative introducing the AssertionError again to the hierarchy... with the drawback of duplicated code.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
As the decision about #4 is not yet clear this is a solution to #21 as alternative of #23 reintroducing
AssertionError
to the hierarchy.I hereby agree to the terms of the Open Test Alliance Contributor License Agreement.