Skip to content

Export a console test to git

If you already have a test in the console, you do not need to rewrite it. The Run from CI dialog generates the test file, the workflow and the CLI command for it.

  1. Open the test and select Run from CI.

  2. On the GitHub Actions tab, copy the workflow. Your account id and project id are filled in. Use the toggle to switch between the pull request workflow and the after-deploy workflow (with the TARGET_URL override).

  3. On the Test file tab, copy or download the YAML and save it as .maxoperf/tests/<name>.yml. The tab also lists the test’s files with suggested repository paths. Download each file and commit it at that path, because the YAML refers to them.

  4. On the CLI tab, copy the command if you prefer to run from another CI system.

  5. Create an API key (the dialog links to it), add it as the MAXOPERF_API_KEY secret, commit the workflow and files, and open a pull request.

After the first sync the test shows the Managed from GitHub banner. From then on, change the test in git. Console edits are overwritten on the next sync.

The GitHub Actions tab generates a workflow with your account id and project id filled in.
The Test file tab exports the test as YAML and lists the files to commit.
The CLI tab gives the command for any other CI system.

The exported file describes the stored test: name, engine, load profile, location, failure criteria, tags, bound config and secret names, and file names with their content hashes. Pushing it to a fresh project creates an equivalent test.

Only plain, single, upload-mode performance tests have a file form. For anything else the dialog shows This test can’t be managed as code and lists the reasons, such as:

  • the test is a VarioTest
  • it has no ready entry-point script
  • it is a browser test or has browser settings
  • it has an end-user-experience probe attached
  • a variable has an inline value, or is bound under a different name than the test uses
  • it has no run location set

Fix the listed items in the console (bind values by name, set a location) and open the dialog again.

Settings, API keys shows your account id next to the key list.

The account id the workflow needs is shown on Settings → API keys with a copy button. It is also prefilled in the dialog.