Skip to content

anvilproject/galaxy-acceptance-tests

Repository files navigation

Galaxy Acceptance Tests

Playwright tests to confirm Galaxy is functioning as expected after deployment.

The tests directory contains a number of Playwright test scripts that will eventually (likely) be combined into a single, end-to-end, test that:

  1. Launches a new Galaxy instance on the Terra production server.
  2. Performs several simple tests to confirm Galaxy is operational:
    1. Create, rename, and delete a history.
    2. Upload data by pasting text into the upload dialog.
    3. Uploads two data file and runs the fastp tool.
    4. Uploads two data files, a reference genome, and a variant calling workflow and runs the workflow.
  3. Shuts down the Galaxy instance leaving the disks intact.
  4. Launches a new Galaxy instance and ensure previous data is still present.
  5. Shuts down the Galaxy instance and deleting the existing disks.

The test files can be grouped into two categories: tests that target the Terra UI (e.g. launch Galaxy), and tests that target Galaxy (e.g. running tools).

Terra tests

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 tab
  • pause.spec.ts
    deletes the Galaxy instance but leaves the disks intact.
  • shutdown.spec.ts
    deletes the Galaxy instance and persistent disks.

Galaxy tests

The test files that target Galaxy functionality:

  • history.spec.ts
    create, rename, and delete a history
  • paste.spec.ts
    upload text by pasting into the upload dialog
  • fastp.spec.ts
    upload two datasets and run the fastp tool
  • variant.spec.ts
    [WIP] upload datasets, a workflow, and runs the workflow

Administrative functions

There are also two "tests", that are used for administrative purposes.

  1. auth.setup.ts
    Run this test in headed mode to save the security context to .auth/user.json. Update the GitHub secret USER_JSON to enable the test user account to authenticate without triggering two-factor authentication.
  2. cleanup.spec.ts
    Delete disks that sometimes linger.

Running the tests locally

To run the tests locally you will need to set the environment variable TERRA_URL to point to the Galaxy instance to be tested. This should be set to the URL of an external Galaxy server or to the string sarscov2 to test the Terra production instance. When testing the Terra production instance you will also need to set TERRA_EMAIL and TERRA_PASSWORD to the email and password of a user than has access to Terra.

TERRA_URL=http://<IP address>:8000/galaxy/
npx playwright test history paste fastp

If testing against a Terra production instance you will also need to run the launch.spec.ts and shutdown.spec.ts tests to launch and shutdown the Galaxy instance.

About

Playwright acceptance tests on the AnVIL production server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages