By Paul Scanlon

Introducing Experiment Lifecycle Hooks

You can now configure each stage of an experiment run using lifecycle hooks: beforeAll, beforeEach, afterEach, afterAll. Seed a database, spin up a sandbox, copy a fixture — then tear it all down when the run completes.

Running experiments with mocked data is an effective way to catch regressions, but there are occasions where you’ll want a production-like environment to gauge real-world behavior. Lifecycle hooks let you create and configure short-lived test environments for each experiment run.

Before lifecycle hooks, preparing a test environment for every experiment meant rolling setup scripts or pointing agents at production data. With lifecycle hooks, experiments can provision their own environment and clean them up when they’re finished. An experiment runs the target against each dataset item.

Hey!

Leave a reaction and let me know how I'm doing.

  • 0
  • 0
  • 0
  • 0
  • 0
Powered byNeon
Close