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.
-
Open the test and select Run from CI.
-
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_URLoverride). -
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. -
On the CLI tab, copy the command if you prefer to run from another CI system.
-
Create an API key (the dialog links to it), add it as the
MAXOPERF_API_KEYsecret, 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.
Round trip
Section titled “Round trip”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.
Tests that cannot be exported
Section titled “Tests that cannot be exported”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.
Get the account id
Section titled “Get the account id”The account id the workflow needs is shown on Settings → API keys with a copy button. It is also prefilled in the dialog.