gnomad-browser icon indicating copy to clipboard operation
gnomad-browser copied to clipboard

Integration test frontend code using recorded production API data

Open phildarnowsky-broad opened this issue 3 years ago • 2 comments

We have recently added snapshot integration tests, but the ones we have to date have fake data in them. For a more realistic test, we could capture real responses to API requests and add snapshot tests that render that data. One potential tool to facilitate this: https://github.com/ijpiantanida/talkback.

phildarnowsky-broad avatar Jul 18 '22 12:07 phildarnowsky-broad

The team decided this is a high priority and will help us systematically check data & API changes.

A solution was discussed that simulates the way we currently use demo deployments, but instead does not rely on our internal users.

  1. Install something like Playwright
  2. Enable codegen recording and click through important pages and elements (See: https://playwright.dev/docs/codegen)
  3. Deploy a demo instance with new data/API changes
  4. Set the API environment variable GNOMAD_API_URL to the one used by this demo deployment
  5. Run integration tests

Ideally this happens in CI.

mattsolo1 avatar Apr 04 '24 17:04 mattsolo1

Related: #1479

rileyhgrant avatar Apr 22 '24 22:04 rileyhgrant