compliance-trestle icon indicating copy to clipboard operation
compliance-trestle copied to clipboard

Reduce the number of JSON test data in favour of generating it on the fly

Open enikonovad opened this issue 2 years ago • 1 comments

Issue description / feature objectives

Currently Trestle tests use a lot of hardcoded test data which is hard to maintain and update. Instead, we should either generate it on the fly from the schema or have a few common test files and modify their content in-memory to test specific cases.

This will allow to reduce the load on the developers when updating to the new OSCAL schemes or writing new tests.

Completion Criteria

  1. Review current JSON test data and access its need.
  2. Explore the ways to reduce the number of test data, whether by generating it on the fly or modifying a "base" files as desired.
  3. Provide a new functionality for the tests to fetch or generate the required data.
  4. Test's logic should remain the same.

enikonovad avatar Feb 09 '23 02:02 enikonovad