Robot Vacuum Whole-Machine Testing: Environment Setup, Test Cases & Log Analysis Guide
This comprehensive guide covers robot vacuum whole-machine testing from hardware/software environment setup and test case design to ADB log capture, serial port debugging, API automation with pytest, defect reporting, and troubleshooting common issues like localization drift, obstacle avoidance failures, and charging problems.
1. What Is Robot Testing and Why Focus on Robot Vacuums
Robot testing is not simply tapping buttons on an app. It requires verifying the complete chain from hardware, embedded software, sensor algorithms, app interaction, to cloud services. Using a robot vacuum as an example, testing covers six modules: whole-machine functions, sensors and algorithms, reliability, system integration, compatibility and environment, and safety regulations. These modules intersect — a battery aging issue may cause charging failure; a dirty sensor may cause map drift. Testers must correlate phenomena with logs like a "product detective" to locate defect directions.
1.1 Typical Work Content
Whole-machine functional testing: cleaning, mopping, recharging, scheduling, remote control, pause, resume.
Sensor and algorithm testing: LiDAR or visual sensors, gyroscope, wall-following, obstacle avoidance, escape, coverage.
Reliability testing: continuous cleaning, long battery life, repeated recharging, drop, obstacle climbing, cable crossing.
System integration testing: interaction with app, voice assistants, mini-programs, cloud accounts.
Compatibility and environment testing: different layouts, floor types, lighting conditions, WiFi environments.
Safety and regulatory testing: battery protection, stall detection, heating, drop prevention, child safety.
These items are not isolated; they cross-influence. For example, when battery is low, can the robot still recharge correctly? How to balance coverage vs. cleaning time? Testers must both execute cases and analyze phenomena to locate defects.
1.2 Why Robot Vacuum Whole-Machine Testing
Robot vacuums are high-volume consumer robots with complete verification chains. They face cost constraints while needing good user experience, many test items, tight cycles, and visible defect impact. Mastering robot vacuum whole-machine testing transfers to other mobile robots, service robots, and AMRs. From a career perspective, robot testing demands multi-disciplinary knowledge — writing cases, building scenes on-site, reading logs, capturing serial data, analyzing sensor data — leading to higher salaries than pure functional testing. Skills and project experience are the main variables; this article focuses on practical methods and processes.
2. Test Environment and Tool Preparation
2.1 Hardware Environment Setup
At minimum, prepare:
2-3 devices under test for comparative testing.
Charging dock and matched power supply; confirm dock position fixed before each test.
Test site: at least 20 sqm room including living room, bedroom, hallway, thresholds, mats, carpets, furniture, cables.
Obstacles: data cables, slippers, scales, small toys, simulated pet waste.
Battery management: record battery level before each test, charge to 100% or same baseline.
Timer and stopwatch: record cleaning duration, recharging duration.
For automation, also need a stable charging port and power-cycle device for loop testing. The site must resemble a real home, not an empty meeting room, because many cleaning and escape issues appear in cluttered spaces.
2.2 Software Toolchain
Android SDK Platform Tools : includes ADB for connecting to the robot's internal Android system or app debugging.
Serial tools: SecureCRT, MobaXterm, Minicom, Python pyserial.
Log capture tools: vendor-specific log services, adb logcat.
Data recording tools: Excel or online spreadsheets for test case records.
Automation frameworks: pytest, unittest for writing case scripts.
Video recording: phone on tripod for fixed-angle capture, replay for fault analysis.
Note: Different vendors use different chips, sensors, embedded systems; tool versions must be adjusted per project. Examples here illustrate thinking and methods; specific command parameters should follow actual product documentation.
2.3 Common Test Instruments
Power meter or power analyzer: measure whole-machine power, standby current, charging power.
Sound level meter: measure noise at different cleaning/mopping modes.
Light meter: evaluate visual sensor test conditions in low light and bright light.
Tape measure or laser distance meter: verify cleaning coverage and robot localization error.
Temperature/humidity meter: ensure consistent test environment.
Micrometer or thickness gauge: measure structural dimensions related to obstacle climbing ability.
Not all instruments are needed initially. For personal learning, phone stopwatch, tape measure, and phone video can complete most functional tests; enterprise-level testing adds professional instruments gradually.
3. Robot Vacuum Whole-Machine Test Item Breakdown
3.1 Functional Test Items
Functional testing verifies whether the robot can perform tasks per product definition. It expands from two dimensions: whole-machine state and cleaning control.
Standby and startup: short press power on, long press power off, power-off restart, indicator light color and blink frequency, voice prompt volume. Key is not just "does it react" but "does it give correct prompts in abnormal states" — e.g., low battery triggers direct recharge, fault recovery.
Cleaning functions: auto cleaning checks bow-shaped path, partition order, boundary handling; spot cleaning checks range and time; edge cleaning checks side brush and roller brush coordination; mopping verifies mop installation detection, water tank leakage, water level gears. These cases test observation — e.g., is path consistent each time at same spot? Is there an obvious missed strip along walls?
Recharging functions: focus on low-battery recharge, post-cleaning recharge, manual recharge, recharge failure retry, power-off resume charging. Recharging is not just "returned"; check charging contact alignment, whether dock is pushed aside, whether robot re-plans after failure — all high-frequency user complaints.
Scheduling and memory: scheduling tests cover time zones, repeat rules, cross-day tasks; resume cleaning verifies interruption, pause timeout, power-off recovery logic. Many "cleaned halfway" complaints stem from incomplete coverage of these scenarios.
3.2 Navigation and Localization Test Items
Navigation and localization are the core capabilities and the hardest to standardize, most prone to issues. In plain terms: localization = robot knows "where I am"; mapping = knows "what the room looks like"; path planning = decides "where to go next"; obstacle avoidance and escape = handle "sudden things on the road".
Mapping accuracy: test in real rooms; first confirm generated floor plan structure in app is complete; then use tape measure or laser distance meter to randomly spot-check several room side lengths, record deviation between map dimensions and real dimensions.
Localization stability: run robot continuously for a long time; observe map for ghosting, wall offset, or relocation.
Obstacle avoidance: cover typical obstacles — data cables, slippers, trash cans, pet toys, furniture legs, low scales. Record detection distance, whether robot slows, whether collision occurs, collision force.
Escape testing: trap robot under chair legs, under bed, beside curtains, in door threshold gaps; observe if it self-escapes, and if timeout correctly reports fault.
Recharge path: initiate recharge from multiple different positions; statistics recharge success rate; observe if path passes narrow areas, if turning near dock is accurate. Also test if robot can find dock again after dock is moved.
3.3 Performance and Reliability Test Items
Battery life: start from 100% at standard mode; record cleaning duration, cleaned area, remaining battery; observe if battery estimation is accurate.
Coverage: select a fixed test area; compare robot map trajectory with physical space to estimate cleaned area ratio.
Obstacle climbing: prepare common thresholds, carpet edges, cables, rails; verify passability under different obstacle combinations. If robot claims 2cm climbing, verify at 1.5cm, 2cm, 2.5cm boundaries.
Hair entanglement: long hair and pet hair entangle roller brush; check if robot auto-reverses to clear, and if roller brush is easy to clean.
Long-run testing: suitable for automation or semi-automation; schedule robot to clean multiple times daily for days or weeks; record failure rate, functional degradation, abnormal noise, battery degradation. Often exposes intermittent defects before release.
Noise testing: record noise values for quiet, standard, strong modes; distinguish main unit noise and dock prompt noise. Different floor materials greatly affect noise; test report must note test floor.
3.4 Safety and Regulatory Test Items
Drop protection: test at stair edges, elevator gaps, height-difference steps; confirm robot does not fall from heights.
Stall testing: block roller brush, side brush, wheels by hand or obstacles; confirm motor reports error and stops promptly, no burnout.
Battery protection: cover overcharge, over-discharge, high temperature, low temperature; usually requires battery test equipment.
Heating testing: use temperature gun to scan robot surface, charging contacts, battery compartment after long run; temperature must not exceed safety limits.
Child protection: check if small parts detach easily, if moving parts have pinch risk.
EMC and regulatory certification usually done by professional labs, but whole-machine testers should at least do basic pre-tests and keep records.
3.5 Connectivity and Compatibility Test Items
WiFi connection: cover 2.4G/5G bands, hidden SSID, WPA2/WPA3 encryption, weak network, router restart auto-reconnect.
App control: verify start, pause, recharge, map view, scheduled cleaning, virtual wall setting.
OTA upgrade: focus on download, pause during upgrade, failure retry, power-off recovery during upgrade, post-upgrade version verification.
Voice assistant integration: cover mainstream voice platforms; watch for multi-device coexistence on same LAN.
Multi-user family sharing, member permission management: avoid issues where user A changes settings but user B state not synced.
4. Practical: Robot Vacuum Whole-Machine Functional Testing Process
4.1 Design Test Environment and Scenarios
First draw a site sketch, measure test area dimensions with tape measure, mark obstacle positions, charging dock position, boundaries. Place robot on dock, charge to 100%. Before each test, clear map or factory reset to ensure consistent initial state.
A standard test room can reference:
Living room: sofa, coffee table, TV cabinet, carpet, power strip.
Bedroom: bed, nightstand, curtains, slippers.
Kitchen or hallway: threshold, water stains on floor.
Balcony: sliding door rail, height difference.
Fix camera angles to include global top-down, robot front view, charging dock view for review. Record environment details thoroughly: weather, lighting, floor material, obstacle photos — critical for defect reproduction.
4.2 Writing Test Case Example
Below is a standard "Auto Clean - Recharge" test case, ready to copy into Excel or test management tool:
Test case management should include: test date, tester, software version, model, battery level, WiFi network, test result (pass/fail/blocked), remarks. This preserves context for later defect reproduction.
When designing cases, don't just write single steps like "click start cleaning". Specify preconditions, environment state, data state. Many issues aren't functional bugs but missing handling in specific states, so preconditions like "battery below 20%", "map already built", "previous task incomplete" are often key to triggering defects.
4.3 Using ADB to Capture Robot Logs
Many robot vacuums run Android or similar Linux systems. Enable developer mode to connect ADB. Capturing running logcat logs is one of the most effective ways to analyze defects.
On Windows or macOS, install Android SDK Platform Tools, then confirm device connection:
adb devices
# Output example:
# List of devices attached
# 123abc deviceConnection successful. Clear cache and start capturing logs:
adb logcat -c
adb logcat -v threadtime > robot_log_20250101.logDuring robot operation, have tester reproduce issue. Press Ctrl+C to stop capture after reproduction. Log file contains navigation module, sensor module, APK exception info.
To focus on a specific process, filter:
adb logcat -s NavigationService:D SensorManager:ENote: Different models may not support ADB, or log tag names differ. First run adb logcat | grep -iE "nav|sensor|motor" to see rough content, then decide filter keywords. If model doesn't support ADB, use vendor log tools or serial output. Capture logs promptly; don't wait until after fault and reboot, because reboot loses most runtime info.
If robot writes logs to a fixed directory, pull them locally: adb pull /sdcard/RobotLog/ /tmp/robot_logs/ Specific path must be confirmed with developers; varies greatly across products.
4.4 Reading Sensor Data via Serial Port
Many robot mainboards provide debug serial ports. Connect via USB-to-TTL module to read real-time printed sensor data: wheel encoders, gyroscope, LiDAR frame data.
Here is a Python serial port tool example to read and save serial logs in real time:
# File path: serial_logger.py
import serial
import time
import datetime
def read_serial_log(port, baudrate, log_file, duration=600):
"""
Read specified serial port data and write to log file
:param port: serial port, e.g. /dev/ttyUSB0 or COM3
:param baudrate: baud rate, e.g. 115200
:param log_file: log save path
:param duration: collection duration in seconds, default 600
"""
try:
ser = serial.Serial(port, baudrate, timeout=1)
except serial.SerialException as e:
print(f"Cannot open serial port: {e}")
return
end_time = time.time() + duration
with open(log_file, 'a', encoding='utf-8') as f:
while time.time() < end_time:
line = ser.readline()
if line:
decoded = line.decode('utf-8', errors='replace').strip()
timestamp = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
content = f"[{timestamp}] {decoded}"
print(content)
f.write(content + '
')
ser.close()
print(f"Log saved to {log_file}")
if __name__ == '__main__':
# Modify serial port, baud rate, and duration as needed
read_serial_log('/dev/ttyUSB0', 115200, 'robot_serial.log', 120)Run with: python serial_logger.py This code timestamps each line of serial data and writes to log file, facilitating alignment with ADB logs and video recordings on timeline to analyze whether sensor anomaly or motion control anomaly occurred first. Serial logs are usually developer-defined debug info; if unfamiliar with data meaning, collect for a few days then ask developers to explain field purposes.
4.5 Using pytest for Simple API Testing
Robot vacuums usually have app-side APIs: bind device, start cleaning, query map. These can be automated. Example with a simulated API:
# File path: test_robot_api.py
import pytest
import requests
BASE_URL = "http://robot-api.test.example.com"
@pytest.fixture
def robot_token():
# Actual project needs login to get token, here only demo
resp = requests.post(f"{BASE_URL}/login", json={"user": "tester", "password": "******"})
assert resp.status_code == 200
return resp.json().get("token")
def test_start_clean(robot_token):
headers = {"Authorization": f"Bearer {robot_token}"}
payload = {"device_id": "ROBOT-001", "action": "start", "mode": "auto"}
resp = requests.post(f"{BASE_URL}/control", json=payload, headers=headers)
assert resp.status_code == 200
data = resp.json()
assert data.get("code") == 0
assert data.get("message") == "success"
def test_start_clean_without_token():
payload = {"device_id": "ROBOT-001", "action": "start"}
resp = requests.post(f"{BASE_URL}/control", json=payload)
assert resp.status_code == 401Run with: python -m pytest test_robot_api.py -v This automates regression of rule-based network interfaces, freeing manual effort for navigation, obstacle avoidance, user experience scenarios. API testing difficulty lies in test data and environment prep: device IDs, account permissions, robot states. Best to maintain a separate test environment to avoid affecting real users.
4.6 Defect Recording and Test Report
Defect records should include:
Defect ID, title, found version, priority, severity.
Reproduction steps, expected result, actual result.
Environment info: model, battery, WiFi, map new or not, test site.
Logs: ADB logs, serial logs, app logs.
Video or image attachments: preferably global view and robot close-up.
Preliminary module judgment: navigation, sensor, motion, app, mechanical, power.
Test report must include at least:
Test scope, test time, software/hardware versions.
Cases executed, pass rate, failed case list.
Defect statistics: by module, severity, status distribution.
Risk items: e.g., "elevator scenario not verified, medium risk".
Conclusion: whether release criteria met, remaining defect list.
A clear test report is not just a pile of screenshots; it must let the project team see at a glance "can current version release, what issues remain". Therefore risk summary and remaining defect list matter more than execution counts.
5. High-Frequency Issue Troubleshooting Approaches
Many defects in robot vacuum testing look like "metaphysics" but actually follow patterns. Below are common issues.
5.1 Localization Drift and Map Corruption
5.2 Obstacle Avoidance Failure or Frequent Collisions
First check sensor installation position and detection range. Common causes:
Sensor fails to recognize low obstacles, e.g., data cables, thin scale edges.
Reflective or dark objects not detected.
Speed too fast after avoidance trigger, braking distance insufficient.
Algorithm allows appropriate collisions for coverage sake.
Troubleshooting flow:
Check logs: did sensor detect obstacle?
If not detected → sensor or perception issue.
If detected but still collided → planning/control issue.
Repeat same obstacle test 5+ times to confirm intermittent or consistent.
Record minimum detection distance and collision force.
5.3 Recharge Failure
5.4 Unstable WiFi Connection
Distinguish whether issue is robot WiFi module or app backend. Troubleshooting order:
Test router signal strength at same spot with phone.
Create hotspot with another phone, let robot connect; judge if router compatibility issue.
Capture robot-side WiFi logs and app-side error logs.
Check if 2.4G band disabled, if guest isolation enabled.
Test different encryption: WPA2, WPA3.
5.5 Cleaning Chaos or Missed Areas
Cleaning chaos usually means localization has failed; robot doesn't know where it is. Possible causes: map loss, gyroscope calibration loss, sensor occlusion, floor slip causing odometry error.
Suggested troubleshooting steps:
Factory reset and rebuild map to rule out map corruption.
Manually remote-control robot straight forward; observe if it veers.
If veers, check wheel encoder and gyroscope data.
If normal, then reproduce chaos in auto cleaning.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
