Quickstart
Start uploading your first test run to TofuPilot in under five minutes.
Account Setup
To use TofuPilot, create an account or join an existing organization by invitation.
Interactive Guide
After creating your account, an interactive guide within the application will walk you through the steps described below.
First Test Run
-
Open your preferred Python development environment. We recommend using virtualenv for isolated Python environments. Learn how to set one up for: VSCode, PyCharm, Sublime Text.
-
Install the TofuPilot Python client:
pip install tofupilot
-
Retrieve your API key from My Profile page and save it as an environment variable.
echo 'export TOFUPILOT_API_KEY=[your_key_here]' >> ~/.zshenv
-
Create a new Python script and paste the following code:
create_run.py
from tofupilot import TofuPilotClient from datetime import datetime client = TofuPilotClient() # Test function def test(): return True # Run test function start_time = datetime.now() run_passed = test() end_time = datetime.now() # Create a test run response = client.create_run( procedure_id="FVT1", unit_under_test={ "serial_number": "000001", # Serial Number = Individual Item "part_number": "PCBA01" # Part Number = Type of Item }, run_passed=run_passed, duration=end_time - start_time )
-
Run the script:
python create_run.py
The console returns:
TofuPilot Python Client <version>
2024-07-24 16:44:18 - ℹ️ Creating run...
2024-07-24 16:44:19 - ✅ Test run created: https://tofupilot.com/<organization>/runs/<uuid>
Congratulations, your first run has been created on TofuPilot 🎉
Run Page
Open the link from the console or navigate to the Run page. The Run has been created:
Here's what happened:
- A new run was created for the
Battery PCBA Test
(IDFVT1
) procedure. This procedure was automatically created when you signed up. - The unit
PCBA01-0001
was created. - The unit was linked to component
PCBA01
, also created. - The default revision
A
was assigned to the component. - The run status was set to
Pass
sincerun_passed
isTrue
.
Next
Congratulations on uploading your first test run to TofuPilot! This simple test is just the beginning. The next guides will show you how to add essential options like test steps, attachments, and more.
If you have any questions, or simply want to meet the team behind TofuPilot, we're always here for you.
Let's make this the start of a long and successful journey! 🥳