torchbox / wagtail-grapple

A Wagtail app that makes building GraphQL endpoints a breeze!
https://wagtail-grapple.readthedocs.io/en/latest/
Other
155 stars 58 forks source link

Proposal: Review and Re-organize tests #304

Open dopry opened 1 year ago

dopry commented 1 year ago

Many of the tests are currently organized around the features of the example site (test_blog, test_general, etc) and not really around the features of the grapple library. There are multiple tests that cover pagination in test_grapple, test_blog, and test_general. These tests seem to favor ensuring complete coverage of the example app rather than simply covering all the cases of grapple. This creates redundant work for grapple test maintenance.

It would be nice to structure a suite of unit tests and integration tests with minimal overlap that provide complete coverage of the documented features rather than focusing on the example site. This process should probably be take in several steps.

A possible roadmap:

  1. [ ] re-organize example into 'testapp`, https://github.com/torchbox/wagtail-grapple/pull/289
  2. [ ] implement code coverage tracking
  3. [ ] identify and remove redundant tests
  4. [ ] add tests to complete unit test coverage
  5. [ ] add tests to complete integration test coverage (testapp tests)
  6. [ ] review test naming to make more consistent.