bryntum / support

An issues-only repository for the Bryntum project management component suite which includes powerful Grid, Scheduler, Calendar, Kanban Task Board and Gantt chart components all built in pure JS / CSS / TypeScript
https://www.bryntum.com
53 stars 6 forks source link

Make a CRUD implementation validation test app #4123

Open bmblb opened 2 years ago

bmblb commented 2 years ago

Related forum post: https://www.bryntum.com/forum/viewtopic.php?f=51&t=20208

Guides contain sections explaining CRUD manager network API, but they do not cover protocol completely. A lot of text to read through, only few data samples, request and response are on different pages which makes it more difficult to comprehend.

Suggestion is to make simple test app that would validate client implementation of CRUD manager protocol is correct. Here are some expectations for such app:

  1. It should use a test running tool that is free and supports automation (to be usable in CI pipeline). New siesta 6 or smth like jest, common syntax, easy to use.
  2. There should be few groups of tests that cover various CRUD manager requests and responses. Covering creating hierarchies, create/delete record, update record in sync response, add record in sync response etc.
  3. Tests should not use Bryntum core code at all, only validate protocol. Basically validating request objects against response objects.
  4. Test suite should use mock URLs allowing to use local objects (so tests pass by default) and allowing to redirect requests to actual backend (to validate client implementation of the protocol)

Idea is following, when use implements a CRUD handler he could run command like this to validate his work:

$ node CRUDVerificationTool/index.js --baseUrl=https://localhost/my-crud-implementation/
// runs test suite, reports any failed expectations
bmblb commented 2 years ago

Order of returned records matters, make sure suite covers that section too: https://www.bryntum.com/forum/viewtopic.php?p=100315&sid=e921ff6112b4efe702692084ce2edec3#p100315