Skip to main content
Select Test runs a Python test on a box and streams its output to the page. The test comes from your GitHub repository, at the branch or commit that you select. You can also run a one-off script that is not in the repository. Use Import Test for this.

Before you start

An owner or admin must set up two things once for the organization:
  1. Connect the GitHub App. See GitHub.
  2. On Settings > Integrations, fill in the Repo Tests card.
An organization has one Repo Tests setup. If the setup is not complete, the Select Test page shows a notice. Each person who runs a test needs a display name, because Stout locks the box under that name. See Account.

Run a test

  1. In Workbench, select a box. Then select Select Test.
  2. In Box, select an online box.
  3. In Branch or commit, select a branch, or type a commit SHA.
  4. Find the test in the list. To filter the list by path, type in Search tests….
  5. Select Run next to the test.
The page starts on the default branch of the repository. The branch list shows up to 100 branches. You can type any other branch name. The Output card streams the output of the test. Its heading shows the test path, the branch or commit, and the box.

What happens during a run

  • Stout gets the test file from GitHub, at the branch or commit that you selected.
  • Stout locks the box under your display name. It releases the lock when the run ends.
  • If you already hold the lock, Stout uses your lock and does not release it.
  • Stout gives the test the variables and secrets for the organization and the box. See Variables and secrets.
  • The test stops after 300 seconds.
If the box runs a Lager version without lock support, the test runs without a lock. Stout refuses the run in these cases:

Stop watching a run

While a test runs, the Output card shows Abort. Abort stops the output stream in your browser.
Abort does not stop the test on the box. Before you select Abort, make sure that the test can finish safely. The test continues until it ends or reaches 300 seconds, and the lock stays until then.

Import a one-off script

Import Test runs a Python script that is not in the repository. The button becomes available after you select a box.
  1. Select Import Test. The Run Python Script dialog opens, with the box from the page selected.
  2. Paste the script on the Code Editor tab, or drop a .py file on the Upload File tab.
  3. Optional: In Arguments, type the arguments, with spaces between them.
  4. Optional: Under Environment Variables, select Add, and then type a name and a value.
  5. Select Run Script.
The dialog shows the output of the script. Stout also gives the script the variables and secrets for the organization and the box. The box must be online. A script can be up to 10 MB. The Timeout (seconds) field starts at 3600. The box stops a script after 300 seconds, even when the field has a larger value.
Import Test does not check the box lock, and it does not take a lock. Before you run a script, check the lock state of the box in the Box field of the Select Test page.

Who can run tests

  • Owners and admins can run tests and scripts on every box in the organization.
  • Members can run tests and scripts only on the boxes that they can access.
  • Only owners and admins can change the Repo Tests setup.
See Roles and permissions.

GitHub

Connect the GitHub App and set up Repo Tests.

lager python

Run the same scripts from the Lager CLI.