๐ Choose Your Method
Best for: Visual testing, real-time monitoring
- Open iOS Control App
- Tap your sensor
- Scroll down โ Tap "Test Workouts"
- Select any workout
- Tap "Start Workout"
โ
Real-time progress bars
โ
Live stats display
โ
Pause/resume/skip controls
Best for: Automation, CI/CD, scripting
# Install
pip install colorama tabulate
# Run a workout
python test_automation.py --workout intervals
# Quick test all scenarios
python test_automation.py --all
โ
Command-line automation
โ
Custom JSON workouts
โ
Batch testing
Best for: Debugging, custom testing
# Set intensity directly
chip-tool levelcontrol move-to-level 180 0 0 0 1 1
# Turn on/off
chip-tool onoff on 1 1
chip-tool onoff off 1 1
โ
Direct hardware access
โ
Single command testing
โ
Debugging
๐ 10 Pre-Built Test Scenarios
| Scenario | Duration | Purpose |
|---|---|---|
| HIIT Intervals | 30m | Test rapid intensity changes |
| Endurance | 45m | Test sustained output |
| Recovery | 20m | Test low intensity baseline |
| Pyramids | 25m | Test progressive ramps |
| Tabata | 4m | Test maximum sprints |
| FTP Test | 25m | Test threshold power |
| Warm-up | 10m | Test gradual builds |
| Sweet Spot | 40m | Test sub-threshold work |
| VO2 Max | 30m | Test high intensity |
| Ramp Test | 15m | Test progressive overload |
๐ฏ Quick Test Examples
Example 1: Test Intervals with iOS App
- Open app โ Select sensor
- Tap "Test Workouts"
- Select "HIIT Intervals"
- Review 9 segments: Warm-up โ Intervals ร 4 โ Cool-down
- Tap "Start Workout"
- Watch progress:
โโโโโโโโโโโโโโโโโโโโ 45% | 13:30 / 16:30 Current: Interval 2 โก 327W | โค๏ธ 171 BPM
Example 2: Quick Test All Scenarios
- Tap "Test Workouts"
- Tap "Run Quick Test Suite"
- Wait 2 minutes
- View results: โ 10/10 passed
python test_automation.py --all
๐งช Running Quick Test Suite
Testing HIIT Intervals... โ
PASS
Testing Endurance Ride... โ
PASS
Testing Recovery Spin... โ
PASS
Testing Pyramid Intervals... โ
PASS
Testing Tabata Protocol... โ
PASS
Testing FTP Test... โ
PASS
Testing Warm-up Routine... โ
PASS
Testing Sweet Spot Training... โ
PASS
Testing VO2 Max Intervals... โ
PASS
Testing Ramp Test... โ
PASS
Test Results: 10/10 passed
Example 3: Custom Workout
Create my_workout.json:
{
"name": "Quick Sprint Test",
"description": "3 sprints with recovery",
"segments": [
{"name": "Warm-up", "duration": 180, "intensity": 100},
{"name": "Sprint 1", "duration": 30, "intensity": 240},
{"name": "Recovery", "duration": 120, "intensity": 80},
{"name": "Sprint 2", "duration": 30, "intensity": 240},
{"name": "Recovery", "duration": 120, "intensity": 80},
{"name": "Sprint 3", "duration": 30, "intensity": 240},
{"name": "Cool-down", "duration": 180, "intensity": 70}
]
}
Run it:
python test_automation.py --custom my_workout.json
๐ฅ Real-World Testing Workflows
Time: 2 minutes
# Quick test all scenarios
python test_automation.py --all
# Check results
# All passed? โ
Good to go
# Any failed? ๐ Investigate
Time: 5 minutes
- Open "Test Workouts"
- Run "Warm-up Routine" (10m)
- Open Zwift during workout
- Verify smooth transitions
- Ready to demo! ๐
Time: 30 minutes
# Terminal 1: Start automated workout
python test_automation.py --workout intervals
# Terminal 2: Monitor logs
screen /dev/ttyACM0 115200
# Zwift: Pair sensors and ride
# Verify power/HR changes match automation
๐ก Pro Tips
Tip 1: Parallel Testing
Run multiple tests simultaneously on different devices using different node IDs
Tip 2: Automated Nightly Tests
Create a cron job to run tests every night and email results
Tip 3: Create Test Playlists
Save common test sequences in text files and run them in batch
Tip 4: Integration with CI/CD
Add test automation to your GitHub Actions workflow
๐ Understanding Results
iOS App Results
Overall Progress: 45%
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
13:30 / 16:30
Current Segment: Interval 2
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 32%
โก 327W | โค๏ธ 171 BPM | 2:43 remaining
โ
Workout Complete!
Total Time: 30:05
Segments Completed: 9/9
All segments completed successfully!
Python Script Results
๐ Workout Complete!
============================================================
Workout Summary
============================================================
Total Time: 0:30:05
Segments Completed: 9/9
โ
All segments completed successfully!
๐ Common Issues & Fixes
| Issue | Solution |
|---|---|
| "Sensor offline" | โ
Check power โ Check Thread network โ Re-commission device |
| "Values not changing" | โ
Enable sensor in app โ Check BLE connection โ Verify firmware running |
| "Zwift not updating" | โ
Re-pair in Zwift โ Check BLE range โ Restart Zwift |
| "Python script fails" | โ
Install dependencies โ Check node-id correct โ Verify chip-tool installed |
โ Success Checklist
Before shipping/demoing:
- All scenarios pass quick test
- Zwift integration works smoothly
- No connection drops in 45-min test
- Transitions are smooth (<2s)
- Values are accurate (ยฑ5%)
- Battery lasts expected duration
- iOS app controls work
- Python automation works
- Custom workouts load correctly
- Documentation is clear
๐ Next Steps
1. Run First Test
python test_automation.py --workout warmup
2. Try iOS Automation
Open app โ Test Workouts โ Start
3. Create Custom Workout
Copy template, modify segments, test it!
Ready to automate! Let's test! ๐
Continue to the full testing guide for advanced features and detailed documentation.