Overview
I built a lightweight test automation tool that simulates a lab workflow: sweep a frequency band, capture
measurements (Gain/Return Loss), and automatically determine PASS/FAIL against spec limits. It uses a mock
instrument driver now, but the driver interface mirrors real SCPI/pyVISA control so it can be swapped for
Keysight/R&S hardware without changing the app.
Goals
- Automate repetitive sweep tests and eliminate manual checks.
- Provide instant visual feedback with clean charts.
- Keep the backend modular so a real instrument driver can drop in.
My Role
- Backend (Flask API, endpoints, scoring logic).
- Mock RF driver (gain/return-loss simulation across frequency).
- Frontend charts (Chart.js) + pass/fail summary UI.
Architecture
- Mock Driver: `connect() → set_frequency() → measure()` returns realistic Gain/Return-Loss with noise.
- Sweep: 2.30–2.60 GHz in 5 MHz steps → JSON measurements.
- Scoring: PASS if every point keeps Gain within 12–18 dB and RL ≤ −10 dB.
- Frontend: Chart.js renders Gain & RL vs frequency; summary banner shows overall result.
Highlights
Automation
One click runs the sweep, evaluates limits, and shows PASS/FAIL immediately.
Hardware-ready
Driver abstraction matches SCPI-style APIs, so real lab gear can plug in later.
Clarity
Engineers get the two plots they care about most and a clear go/no-go decision.
What I Learned
- Designing test automation around clear pass/fail criteria saves engineers time.
- Separating backend logic from visualization keeps the system flexible.
- How to deploy a Flask app with Gunicorn on Render and manage static assets.
Next Steps
- DUT form + spec limits input, server-side scoring per point, run history & CSV export.
- Swap mock driver for SCPI/pyVISA to control real instruments.
- PDF report generation with plots and limits summary.