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

Include comparison of expected and actual value in failure message #125

Open
krichter722 opened this issue Jul 10, 2021 · 1 comment
Open

Comments

@krichter722
Copy link

krichter722 commented Jul 10, 2021

It'd be nice if a comparison between the expected and the actual value would be included in test failure messages for all assertions. So far I'm missing this for equal and equalRaw and noticed that it's already provided for documentCount, I didn't make a listing at the time of writing this issue.

There needs to be a concept/decision made about overlong actual and expected string values. I guess the first step could be truncation from the beginning, follow-up could be an excerpt of the start of the first mismatch plus a bit of offset to make it easier to find.

@quintush
Copy link
Owner

quintush commented Nov 1, 2021

Hello @krichter722 ,

Can you give me an example of what you are missing?

All the validator have and Actual, Expected and some also have a Diff listed.
Based on the other questions, i do notice that the Diff can be better explained, but if you have better ideas to improve the errorhandling i'm open for suggestions.

Greetings,
@quintush

d3adb5 pushed a commit to d3adb5/helm-unittest-tests that referenced this issue Apr 30, 2024
…tImprovement

Feature/j unit export improvement
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

No branches or pull requests

2 participants