Skip to main content
A Factory suite is a set of files for a production or QA test. One Python file, the entry point, defines the test steps. Stout runs the suite on a box and shows each step to an operator, with a pass or fail result. Use Factory when the same test runs the same way on every unit. For hands-on work on one box, use Workbench. To write the entry point, see Write a Factory suite.

Who can use Factory

  • Factory shows in the sidebar when your organization has the Factory feature and you have access to it. An owner or admin controls this access. See Members and invitations.
  • Owners and admins can import, edit, run, cancel, and delete suites.
  • Members can view suites and runs. On a live run, a member can also answer the prompts for the operator.
See Roles and permissions.

Import a suite

  1. In the sidebar, select Factory, and then select Import Suite.
  2. In Suite Name, type a name.
  3. Optional: In Description (optional), type a description.
  4. Add the files. Select Add Files or Add Folder, or drag the files onto the page.
  5. In Entry Point, select the Python file that runs the suite.
  6. Select Import Suite.
Add Folder keeps the paths of the files inside the folder, such as images/reset_button.jpg. It does not keep the name of the folder itself. If the files include main.py, Stout selects it as the entry point. Each file can be up to 50 MB. Stout accepts only these file types. It refuses a file with no extension or with another extension. Stout reads the entry point and lists its steps on the suite page. If you import the same files again, Stout creates a second suite. To change a suite, use Add / Replace Files on the suite page.

The suite page

The suite page has three buttons: Edit, Delete Suite, and Start Run. It also has these cards:

Change the files

Select Add / Replace Files or Add Folder. A new file with the same path as an existing file replaces that file. When you replace the entry point, Stout reads the steps again. To remove a file, point to the file and select the X. Stout deletes the file from storage, and you cannot get it back. If you remove the entry point, the suite cannot run. The suite page shows Missing entry point, and the suite list shows No entry point. To fix this, upload a file at the same path, or change the entry point.

Edit a suite

Select Edit to change the name, the description, or the entry point. The entry point must be the path of a file in the suite. When you change the entry point, Stout reads the steps from the new file.

Delete a suite

Delete a suite only when you do not need its files or its run history. Delete Suite removes the suite, all of its files, and all of its runs. You cannot undo a delete.

Run a suite

Before you start a run, make sure that nobody else uses the box. Stout does not check the box lock when a run starts.
  1. On the suite page, select Start Run.
  2. In the Select a Box dialog, wait until Stout refreshes the status of the boxes.
  3. Select an online box, and then select Start Run.
The dialog selects the box of the most recent run first. The run page opens when the run starts. Stout refuses to start the run in two cases:
  • The suite has no file at the path of the entry point.
  • Another Factory run on the box is still in progress.
After the start, Stout does these checks and tasks in order. If a check fails, the run ends with an error.
  1. Stout checks that the box sent a heartbeat in the last 5 minutes.
  2. Stout sends the variables and secrets for the box. See Variables and secrets.
  3. Stout copies every suite file to the box.
  4. Stout runs the entry point in the Lager container on the box.

Watch a run

A banner at the top of the run page shows the state of the run, the elapsed time, and the run number. While the page receives events from the run, the banner shows Live. If the connection drops, the page shows Connection lost. Reconnecting… and connects again. The step list shows each step and its result. Select a step to read its instructions and to filter the console to that step. Select Back to live step to follow the run again. The Console Output card shows stdout and stderr side by side. Clear filter removes the step filter.

Answer operator prompts

A step can ask the operator for input. The prompt shows under the current step. A prompt can be a set of buttons, a text field, radio buttons, checkboxes, or a list. A prompt with only Pass and Fail shows two large buttons. A prompt with a time limit shows the number of seconds that remain. If nobody answers in time, Stout answers for the operator. For buttons, Stout selects Fail if the prompt has a Fail button. Otherwise it selects the last button. For other prompts, Stout sends no value. The console then shows a message about the timeout. If you read a different step while a prompt waits, a banner names the step that needs a response. Select Go to live step to answer the prompt.

Cancel a run

During a run, an owner or admin can select Cancel. Stout sends a stop signal to the suite process on the box, and it marks the run as cancelled.

Run history

Run History on the suite page shows 10 runs at a time. Select Load more to show more runs. Select a run number to open the page of that run. After a run ends, its page shows the step results, the messages from self.log(), the errors, and stderr. The page does not keep other stdout output after the run ends. To keep a message, write it with self.log().

Write a Factory suite

Define steps, prompts, and pass or fail results in Python.

Variables and secrets

Give a suite the values that it needs without putting them in its files.