@@ -306,8 +306,12 @@ install the recommended extensions.
306306- ` pnpm test --project <project-name> ` - run Vitest on a specific project
307307- ` pnpm support:setup ` - create/update Poetry environments required for
308308 [ testing the providers] ( #providers-tests )
309- - ` pnpm support:sample ` - create ` sample.h5 `
309+ - ` pnpm support:sample ` - create ` sample.h5 ` (for h5grove and h5wasm)
310+ - ` pnpm support:sample --hsds ` - create ` sample-hsds.h5 ` (for HSDS)
310311- ` pnpm support:h5grove ` - start h5grove support server
312+ - ` pnpm support:hsds ` - start HSDS support server
313+ - ` pnpm support:hsds:load ` - load HSDS sample file (HSDS support server must be
314+ running in separate terminal)
311315- ` pnpm cypress ` - open the
312316 [ Cypress] ( https://docs.cypress.io/guides/overview/why-cypress.html ) end-to-end
313317 test runner (local dev server must be running in separate terminal)
@@ -380,11 +384,11 @@ when calling `pnpm test`.
380384
381385### Providers
382386
383- Two data providers are currently tested through their respective APIs:
384- ` H5GroveApi ` and ` H5WasmApi ` . Each API test (` <provider>-api.test.ts ` ) works as
387+ The data providers are tested through their respective APIs: ` H5GroveApi ` ,
388+ ` H5WasmApi ` and ` HsdsApi ` . Each API test (` <provider>-api.test.ts ` ) works as
385389follows:
386390
387- 1 . It instanciates the API using a sample file called ` sample.h5 ` , located in
391+ 1 . It instanciates the API using a sample HDF5 file , located in
388392 ` support/sample/dist ` , that contains a lot of HDF5 datasets of various shapes
389393 and types.
3903941 . It retrieves the values of all the datasets in the sample file and stores
@@ -412,13 +416,24 @@ pyenv and Poetry:
412416 pyenv exec pnpm support:setup
413417 ```
414418
415- Once the Poetry environments are created, you can create ` sample.h5 ` , start
416- h5grove and run the API tests:
419+ Once the Poetry environments are created, create the sample files, start the
420+ h5grove and HSDS support servers (h5wasm doesn't need one), and run the API
421+ tests:
417422
418423``` bash
419- pyenv exec pnpm support:sample
424+ # Create sample files
425+ pyenv exec pnpm support:sample # for h5grove and h5wasm
426+ pyenv exec pnpm support:sample --hsds # for HSDS
427+
428+ # Start support servers in separate terminals
420429pyenv exec pnpm support:h5grove
421- pnpm test api
430+ pyenv exec pnpm support:hsds
431+
432+ # Load sample file into HSDS
433+ pyenv exec pnpm support:hsds:load
434+
435+ # Run the API tests
436+ pnpm test api # or `<provider>-api` for a specific provider's API test
422437```
423438
424439> If the Python version specified in ` .python-version ` is globally available on
@@ -440,6 +455,10 @@ environment lacks support for `float128`), you may
440455it into the ` support/sample/dist ` folder. However, please beware that the file
441456may not be up to date.
442457
458+ Environment variables defined in ` .env.test ` files, and overridden in
459+ ` .env.test.local ` files, can be used to skip a provider's API test, change its
460+ support server URL, or change its test file.
461+
443462### Visual regression
444463
445464Cypress is used for end-to-end testing but also for visual regression testing.
0 commit comments