You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I often need to compare the output of some REST API endpoint against a "known correct result" file.
This allows me to share the file with business, QAs and customers to get early feedback. It also helps them to keep track of changes since they get to see the current result without having to deploy and run the application.
For this to be efficient, I need a way to update the file when the output changes.
With the current implementation of JSONassert, this isn't efficient since I have to parse the error message myself, find the location in the file and then copy&paste every change myself.
My approach would be much more efficient if JSONassert would format both JSON trees into strings and then would call assertEquals() on them. JUnit handles this with a special ComparisonFailure which will allow the IDE to show a textual diff. That way, I can see all difference at once and compare them side by side. If the actual output looks correct, I can simply "Select All" and paste the new content into the file.
The text was updated successfully, but these errors were encountered:
I often need to compare the output of some REST API endpoint against a "known correct result" file.
This allows me to share the file with business, QAs and customers to get early feedback. It also helps them to keep track of changes since they get to see the current result without having to deploy and run the application.
For this to be efficient, I need a way to update the file when the output changes.
With the current implementation of JSONassert, this isn't efficient since I have to parse the error message myself, find the location in the file and then copy&paste every change myself.
My approach would be much more efficient if JSONassert would format both JSON trees into strings and then would call
assertEquals()
on them. JUnit handles this with a special ComparisonFailure which will allow the IDE to show a textual diff. That way, I can see all difference at once and compare them side by side. If the actual output looks correct, I can simply "Select All" and paste the new content into the file.The text was updated successfully, but these errors were encountered: