balena-io / etcher

Flash OS images to SD cards & USB drives, safely and easily.
https://etcher.io/
Apache License 2.0
29.29k stars 2.08k forks source link

End to end tests (incl. flashing a real USB device) #3889

Open ab77 opened 1 year ago

ab77 commented 1 year ago

Currently the Spectron framework (Selenium/WebDriver for Electron) only performs a basic test window visibility test: https://github.com/balena-io/etcher/blob/master/tests/spectron/runner.spec.ts

This test adds very little confidence as to operability/functionality of a release. The framework is also deprecated.

We need to implement a reasonable e2e test for Etcher using a supported framework, which tests an actual user journey through the product (i.e. flashing a USB drive with an image). We can instrument a self-hosted GitHub actions runner for this with access to physical USB device(s).

lurch commented 1 year ago

I guess https://github.com/balena-io/autohat-board could also be used to automatically simulate inserting / removing a USB device from a computer? :thinking:

mcraa commented 1 year ago

https://github.com/balena-io-experimental/etcher-experimental/blob/middlewares/playwright.config.ts