cedadev / search-futures

Future Search Architecture
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Create test suite with known fixtures #177

Open agstephens opened 1 year ago

agstephens commented 1 year ago

Build a test suite that uses known items via a test fixture

Rationale

The STAC service works, and exposes a range of search features. We need reproducible and specific information about each feature to assert that everything works correctly. Ideally, we want:

  1. Unit tests
  2. Documentation
  3. Example Notebook(s)

To test properly, we should create a developer environment that includes all components:

How can we ensure the tests work when the index contents change?

We can make the tests robust if we:

  1. Define a known set of items (by their file paths/directories)
  2. Create a script/tool to extract those items from a given service endpoint
  3. Also extract the relevant asset and collection records in relation to those items
  4. Write tests against the known contents and structure of those items and assets.

Task list

Tests will use the known test fixture to make sure that the functions of the search API are working correctly, e.g.: A known temporal and spatial request will only return one FAAM flight A known combination of facets will match 2 known CMIP6 records Write the code/tests in one place: Parse to generate: Notebook(s) Unit test(s) Documentation Assets are all correct based on Item: E.g. correct list No duplicates, etc.

Adik8688 commented 1 year ago

Today's my last day, so I'm removing my self from assignees.