Sub-units
Assemble and track the sub-units of the unit under test.
Overview
Most hardware products are made of multiple components, tested individually and at each step of assembly to the final product. TofuPilot's sub-unit features enable automatic test traceability through the entire process.
Integration
You can define sub_units
in your assembly test as a list of dictionaries. Each dictionary represents a sub-unit with the key serial_number
for its serial number.
from openhtf import Test, PhaseResult
from tofupilot.openhtf import TofuPilot
def main():
test = Test(
procedure_id="FVT140",
procedure_name="Camera Assembly",
part_number="CAM1",
sub_units=[
{"serial_number": "PCB1A001"},
{"serial_number": "LEN1A001"}
],
)
with TofuPilot(test):
test.execute(lambda: "CAM1A001")
if __name__ == "__main__":
main()
In-app view
You can see in this example the creation of the camera assembly with its sub-units listed as children in the Units page. You can navigate to these sub-units using the expansion menu on the left.
On the specific camera assembly Unit page, the Sub-units section allows you to view and navigate to their individual pages.