I am sketching out how to test a CRUD API.
My idea is to create a simplified model / FSM, generate different states and test for properties based on the model.
E.g. assuming everything’s successful,
- GET /users
- POST /create/id/9
- DELETE /delete/id/9
- GET /users
users from 1. and 4. should be the same
Then do the a similar test when
- GET /users
- POST /create/id/8
- GET /users
3.'s users should have one more entry etc.
or when
- GET /users
- POST /create/id/11
- DELETE /delete/id/54 //:error
- GET /users
Again 4’s users should have one more entry.
basically, setting properties for as many cases I can, and then testing with random test-cases.
Problem is, I cannot find much material online, I am sure it is pretty standard esp. as CRUD APIs are pretty standard.. (?)






















