Report

Create your own customizable test reports.

Report template in the Procedure page

Overview

Manufacturing test reports often need static, formatted outputs for compliance, export, and sharing, beyond structured test phases and attachments. TofuPilot allows you to programmatically create these reports for each run.

Each run report is generated from a Report template defined in the Procedure and can be dynamically modified using values obtained during the run.

Integration

You can customize your report in the in-app Report template on the Procedure page, then use report_variables to auto-fill it when the test uploads to TofuPilot. You can find the filled report on the Run page.

from tofupilot import TofuPilotClient
from datetime import datetime

def get_unit_under_test():
    return {"serial_number": "PCB1A001", "batch_number": "1024"}

def main():
    client = TofuPilotClient()

    uut = get_unit_under_test()

    client.create_run(
        procedure_id="FVT1",
        unit_under_test={
            "serial_number": uut["serial_number"],
            "part_number": "PCB1",
            "batch_number": uut["batch_number"],
        },
        run_passed=True,
        report_variables={
            "motor_serial_number": uut["serial_number"],
            "motor_batch_number": uut["batch_number"],
            "production_date": str(datetime.now().strftime("%d.%m.%Y")),
            "report_date": str(datetime.now().strftime("%d.%m.%Y")),
            "safety_test_status": "Passed",
        },
    )


if __name__ == "__main__":
    main()

Insert variable field

You need to define your report template in the Report template section on the Procedure page by clicking the Edit button. Create variables by wrapping the name in double curly brackets: {{variable-name}}. These become customizable inputs.

Procedure Report Template Variables

In-app view

Access the report of the new run in the Report section on the Run page, where the variables are automatically filled.

Report on Run page generated from Procedure

Report template

The editor in the Report template section on the Procedure page provides a full set of blocks and marks to create rich reports:

CategoryType
HeadingsHeading levels 1, 2, 3
ContentParagraph, Table, Code Block, Image, Horizontal Rule
Text StylingQuote, Blockquote, Paragraph
ListsBullet Points, Numbered List, To-Do List
MarksBold, Italic, Underline, Strikethrough, Link, Highlight, Code
Procedure Report Template Variables

Was this page helpful?