Skip to main content

How-to: Automate and Populate Sample Entity Test Data

Issue:

How can a user automate and set up sample entity data for use in testing and development?

Solution:

  • Yes this is possible - a simple way to generate test data would be to manually create all the samples, containers, items, etc. to be added to ESP

  • Then, users can export them with esp dump

    • In the instance that the user wants to export container all of their container instances and all of their sample instances, they would do something like this: esp dump --model container --model sample

    • esp dump -h and esp import -h can be used to see acceptable model names/types to export/dump

  • Users can add these files to the content.yaml file for automated seeding, or a custom ansible task could be added if users would like to import certain situations, e.g., only in dev environments

  • If users desire to have experiments/samplesheets populated, those require writing custom experiment.yaml files and importing them with ESP Client, or as a Pytest