Playwright tests to confirm Galaxy is functioning as expected after deployment.
The tests directory contains Playwright test scripts that verify Galaxy functionality across two deployment scenarios:
- Terra-hosted Galaxy: Tests that manage the full lifecycle on Terra (launch, test, shutdown)
- External Galaxy: Tests against a standalone Galaxy instance running on a known URL
A complete end-to-end Terra test flow includes:
- Launching a new Galaxy instance on Terra
- Running functional tests:
- Create, rename, and delete a history
- Upload data by pasting text into the upload dialog
- Upload datasets and run the
fastptool - Upload datasets, a reference genome, and run a variant calling workflow
- Pausing the Galaxy instance (preserving disks)
- Resuming and verifying data persistence
- Shutting down and cleaning up resources
Test files are organized into two categories: Terra tests (platform operations) and Galaxy tests (application functionality).
The test files that target Terra functionality are:
login.spec.ts
performs the login flow to authenticate with a Google account.launch.spec.ts
launches a Galaxy instance with the default configuration.open.spec.ts
opens Galaxy in a new browser tabpause.spec.ts
deletes the Galaxy instance but leaves the disks intact.shutdown.spec.ts
deletes the Galaxy instance and persistent disks.
The test files that target Galaxy functionality:
history.spec.ts
create, rename, and delete a historypaste.spec.ts
upload text by pasting into the upload dialogfastp.spec.ts
upload two datasets and run thefastptoolvariant.spec.ts
[WIP] upload datasets, a workflow, and runs the workflow
Administrative test utilities:
auth.setup.ts
Authenticates to Terra and saves session to.auth/user.json. This allows subsequent tests to bypass Google OAuth login and avoid captchas. Run in headed mode:npx playwright test tests/auth.setup.ts --headed. For CI/CD, update the GitHub secretUSER_JSONwith the contents of this file.cleanup.spec.ts
Cleans up orphaned persistent disks that sometimes linger after test failures.
-
Install dependencies:
npm install npx playwright install
-
Configure environment variables: Create a
.env.localfile (or set environment variables) with the following:For Terra testing:
TERRA_URL=test # Options: 'test'/'dev', 'production', 'sarscov2' TERRA_WORKSPACE=acceptance-tests # Or 'integration_tests' [email protected] TERRA_PASSWORD=your_password
For external Galaxy testing:
TERRA_URL=http://<IP_ADDRESS>:8000/galaxy/
-
Authentication setup (Terra only): To avoid Google captchas, run the authentication setup once:
npx playwright test tests/auth.setup.ts --headedThis saves your authenticated session to
.auth/user.json, which is automatically reused by all subsequent tests.
Test an external Galaxy instance:
TERRA_URL=http://35.196.87.134:8000/galaxy/ npx playwright test history paste fastpTest against Terra (full lifecycle):
npx playwright test login launch # Launch Galaxy on Terra
npx playwright test history paste fastp # Run Galaxy functional tests
npx playwright test shutdown # Clean upRun all tests:
npx playwright testRun specific test file:
npx playwright test tests/fastp.spec.tsDebug tests (headed mode with inspector):
npx playwright test tests/fastp.spec.ts --debugRun with visible browser:
npx playwright test --headed