Mirror Model for API testing

Gil Zur
1 min readJan 12, 2024

--

Photo by Christina @ wocintechchat.com on Unsplash

Mirror Model is changing everything , not only the UI testing .

The mission of testing APIs become much more easier , reliable and easy to maintain.

Let’s take a look on the public API of book store:

First we have to :

  1. Save “templates” of all Json requests to it will be easy to change in case of changes at the API.
  2. Serialize every Json into object so access to his attributes will be much more intuitive.

After we completed the above steps we have to create classes according to the structure of the API.

That means that we have class “BookStore” with six actions.

All actions will work with class book

and actually emulate the logic behind tha API.

What about the test?

The test call the relevant actions and check that “emulator” results are equal to the uut results.

Interested in an additional information or advice?

https://www.linkedin.com/groups/12877755/

gilz1407@gmail.com

--

--

Gil Zur

Imagine a world where QA & QA automation become an elite unit and central screw in the organization.