Report

Beyond structured test steps and attachments, manufacturing test reports sometimes need to produce static formatted reports to facilitate compliance, exporting, and sharing. Tofupilot enables the creation of these types of reports programmatically for each run.

This guide explains how to use Tofupilot’s report feature to create, customize, and export test run reports.

Report Template

Each run report is generated from a report template defined in the procedure, with a variable system allowing dynamic modification during the creation of the run using values obtained during the run.

Create report template

Open the page of the procedure for which you want the runs to have a report, navigate to the Report Template section, and then click on the Edit button.

Tofupilot provides a collaborative rich text editor to help you create a report template in the desired format.

Procedure Report Template

The editor provides a full set of blocks and marks to create rich reports:

CategoryType
HeadingsHeading levels 1, 2, 3
ContentParagraph, Table, Code Block, Image
Text StylingQuote, Blockquote, Paragraph
LayoutHorizontal Rule, Hard Break
MarksBold, Italic, Underline, Strikethrough, Link, Highlight, Code

Insert variable field

To create variables in a procedure report template, wrap the variable name in double curly brackets: {{variable-name}}. These fields will then become customizable inputs.

Procedure Report Template Variables

Example

Create a run from the procedure and use the report_variables parameter to populate the variables fields.

create_run_report.py

from tofupilot import TofuPilotClient

client = TofuPilotClient()

def test_function():
    # your test execution goes here
    run_passed = True
    report_variables={
      "t-processor": "75°C",
      "status-processor": "Pass",
      "t-regulator": "78°C",
      "status-regulator": "Pass",
      "t-memory": "64°C",
      "status-memory": "Pass",
      "t-power": "72°C",
      "status-power": "Pass",
    }
    return run_passed, report_variables

run_passed, report_variables = test_function()

client.create_run(
    procedure_id="SOP-35",
    unit_under_test={
      "serial_number": "0001",
    },
    run_passed=run_passed,
    report_variables=report_variables
)

Run Page

Access the report of the newly created run where variables have been automatically populated.

Run Report

Was this page helpful?