Xceptance / neodymium-library

A test automation library based on common other best practice open source libraries. It adds missing functionalities but does not reinvent the wheel. Just glues stuff together nicely and adds some sprinkles.
MIT License
80 stars 11 forks source link

Improvement: Add a possibility to do good JSON assertions #279

Open wurzelkuchen opened 1 month ago

wurzelkuchen commented 1 month ago

Quick Description

In several projects we check for JSON data (REST, Google Analytics, etc.) These checks often result in a big unreadable text blob as an error message. We can do better. We should add a helper class to assert JSON Strings. If an assertion fails however we need a good message and overview on the JSON data inside our allure report.

User Story

As a test report reader, I want to see directly what is wrong with the JSON data, compared to the expected test data so that I don't waste time fiddling around with the data.

Upfront research

Functional Requirements

Note: for the methods with jsonPath be reminded that those can have simple fields as well as complex json data as a result.

Documentation Requirements

Test Requirements

wurzelkuchen commented 3 weeks ago

Update: after internal discussion the requirements were adapted. We want to support different JSON compare modes, as we need those in different customer projects