Attachments

Attach files collected during execution to the test record.

Overview

Hardware tests often generate extra data, like images, that can't be captured as measurements. TofuPilot uploads these attachments, allowing you to access and download them directly from your workspace.

Integration

You can add attachments using OpenHTF's attach or attach_from_file functions. With TofuPilot Client, use the attachments field when creating a run with create_run.

import openhtf as htf
from tofupilot.openhtf import TofuPilot

def step_file_attachment(test):
    test.attach_from_file("/path/to/your/logfile.png")
    return htf.PhaseResult.CONTINUE

def main():
    test = htf.Test(phase_file_attachment, procedure_id="FVT1", part_number="PCB1")
    with TofuPilot(test):
      test.execute(lambda: "PCBA1A001")

if __name__ == "__main__":
    main()

In-app view

A dedicated Attachments section is automatically created on the Run’s page. Attachments can be viewed in the browser or downloaded.

Was this page helpful?