question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

While testing complex models it’s quite hard to say where the problem lies exactly (which model property does not match expected value):

Now:

java.lang.AssertionError: 
The following assertion failed:
Expected <[Album(name=albumName, artist=artistName, wiki=AlbumWiki(published=published), mbId=1)]>, actual <[Album(name=albumName, artist=artistName, wiki=null, mbId=1)]>.

If two object are of the same type we could try to display each property in separate line (maybe even add tabs for nested models/properties). Goal here is to instantly know which property does not have expected value:

Expected

java.lang.AssertionError: 
The following assertion failed:
Expected:
name=albumName - OK
artist=artistName - OK
wiki=null but it was AlbumWiki(published=published, summary=summary)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
MarkusAmshovecommented, Mar 4, 2021

I’ll interpret igors emoji reaction as “case closed” 😃

1reaction
drcolombocommented, Mar 2, 2021

shouldBeEquivalentTo doesn’t support backtick notation, only pure JVM, as it expects 2 parameters, not only one: an expected object and config of EquivalencyAssertionOptions type. In other words, this should work fine: result.shouldBeEquivalentTo(albums)

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Reduce Errors and Improve Transparency by Using ...
How to Reduce Errors and Improve Transparency by Using More Precise Citations · Definitions of Citation, Reference, and Quotation · The Prevalence ...
Read more >
Improving Quality, Minimizing Error: Making It Happen
If we are to reduce errors and improve quality substantially, we must create systems and care processes that anticipate inevitable human errors and...
Read more >
How to reduce the number of errors and improve the ... - Picomto
There are methods and solutions to help industrial companies to reduce errors and improve the production quality : Poka Yoké, the 8D methods ......
Read more >
8 Steps To Take After Making Mistakes at Work (With Tips)
Tips to reduce the likelihood of making mistakes at work. Here are some tips you can use to reduce the chances of making...
Read more >
The Path to Improve Diagnosis and Reduce Diagnostic Error
Illuminating the blind spot of diagnostic error and improving diagnosis in health care will require a significant reenvisioning of the diagnostic process ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found