data-api-builder icon indicating copy to clipboard operation
data-api-builder copied to clipboard

Improve Test Times

Open gledis69 opened this issue 2 years ago • 0 comments

Our testing is thorough and is crucial to ensure the feature integrity for all the databases and api-s we support. Understandably, due to the ever growing nature of our tests, the test times are getting longer to the point where they hinder development (it is not as bad now as it will be 😄).

A couple of low hanging fruit type of actions that can be taken to improve test times:

  • Introduce test categories for GQL and REST to run in parallel so we can run only a portion of the testing suite during development, and we can create pipelines for GQL and REST for each db to improve CI runtime as well.
  • The db resets that we do after every mutation are also very expensive and contribute disproportionally to the runtime. Most mutations only update a single table. We can probably split up the db setup files into smaller files for each entity. Note that there will be dependencies between them, and we can use the file system to structure the dependencies or maybe use the db to infer the dependencies, but we should be able to then just reset a single entity by running its file and the files for its dependents.

gledis69 avatar Feb 03 '23 08:02 gledis69