White Paper

Hardware-in-the-Loop Testing Automation: How QA Teams Cut Testing Cycles by 70%

How to automate QA for hardware-connected applications. Learn the strategies that helped Fi, Lumo, and a smart mattress company achieve 70% faster testing cycles without sacrificing coverage.

P
Pie Labs
Research Team
18 min read

Introduction

Automating QA for hardware-connected applications presents significant challenges. When software depends on physical devices, traditional test automation often struggles with flaky failures, timing inconsistencies, and state mismatches between devices and applications.

Through collaboration with hardware companies over the past year, Pie developed test automation strategies addressing these challenges. Three companies featured—Fi, Lumo, and a smart mattress company—sought ways to accelerate releases without compromising coverage.

"The time between having a release candidate ready and being fully tested has gone from two to three days to a few hours."

— Philip Hubert, Director of Mobile Engineering, Fi

This whitepaper documents implementation strategies rather than theory, including specific approaches and practical applications.

70%
Testing Cycle Reduction
80%
E2E Coverage from Discovery
~0
Test Maintenance Overhead

The Problem

Why Hardware Apps Break Test Automation

Five architectural challenges undermine traditional automation:

Problem 1: Device State Lives Outside the Application

Hardware state exists in firmware and device memory rather than the app's UI layer. Connection status, sensor readings, and device modes aren't reliably detectable through standard automation frameworks, leading teams to rely on arbitrary timeouts and indirect indicators producing inconsistent test results.

Problem 2: Hardware Introduces Timing Variability

Software responds in milliseconds; hardware doesn't. Wireless connections establish in 2-20 seconds. Sensor readings arrive with variable delays based on battery level, signal strength, and environmental conditions. Test frameworks expecting consistent timing encounter flaky tests eroding confidence.

Problem 3: Multi-Layer Complexity

Hardware apps span three layers: device firmware, backend APIs, and frontend applications. Root cause analysis becomes complicated when failures could originate from any layer, consuming diagnostic time.

Problem 4: Continuous Update Cycles

Firmware updates alter UI behavior, timing, response formats, and status indicators. Tests passing yesterday fail today not from actual breakage but from shifted assumptions.

Problem 5: Manual Testing Becomes the Default

When automation repeatedly fails, teams retreat to manual testing. At low release velocity this works; at weekly releases, QA becomes the bottleneck constraining deployment speed.

Industry Validation: The World Quality Report 2024 indicates that "50% of organizations cite test maintenance as their top QA challenge" (Capgemini, Sogeti, OpenText).

How Pie Approaches Hardware Testing

Pie is an AI-native QA platform interpreting screens visually rather than through code selectors, functioning like human perception. Built for applications where traditional automation struggles, including hardware-connected apps.

Five strategies emerged from Pie implementations with hardware companies, each addressing specific challenges. Some are Pie-specific; others represent architectural approaches applicable across tooling platforms. All have been implemented in production environments with measurable results.

Five Strategies for Hardware App Testing

Strategy 1: Layered Testing Architecture

Core Insight: Most hardware apps contain predominantly software functionality.

Example: GPS pet collar apps handle location tracking but also manage authentication, pet profiles, activity history, notification settings, and payment processing. Smart mattress apps display sleep data while managing user preferences, chart rendering, account settings, and subscriptions.

Hardware-dependent functionality typically represents 20-30% of applications; remaining 70-80% constitutes pure software never touching physical devices.

Three-Tier Classification

Tier Definition Examples Approach
Tier 1: No Hardware Flows never interacting with device state Login, profile management, settings, payment Full automation, no special handling
Tier 2: Simulated Hardware Flows needing device data but not live devices Activity dashboards, historical charts, status displays Automation with API-based data seeding
Tier 3: Physical Hardware Flows requiring actual device interaction Bluetooth pairing, initial setup, physical button presses Manual testing, tightly scoped

Fi Results: App analysis identified 80%+ of user flows—authentication, pet profiles, activity dashboards, walk history, notification settings—requiring no physical collar. Hardware-dependent flows (Bluetooth pairing, collar LED control, initial sync) represented a small fraction.

Strategy 2: API-Driven Device Simulation

Core Insight: Hardware apps requiring device data don't need devices providing that data.

Hardware apps display information originating from devices—GPS coordinates, sleep metrics, sensor readings, status updates—received through APIs and rendered in UI. Applications process whatever data reaches them, regardless of physical device origin versus injection into the backend.

Two Components

  • Test Account Seeding: Create test accounts pre-configured with specific device states and historical data. Instead of connecting devices and generating data organically, backends populate accounts with exactly what tests require.
  • Hardware Blocker Bypass: Single hardware dependencies blocking downstream flows (scanning QR codes, tapping NFC chips) can't be automated, but their results can be simulated.

Strategy 3: Pre-Configured Test Accounts

Core Insight: Each test account represents different device states, usage patterns, or edge cases.

Traditional hardware testing requires manipulating physical devices to create scenarios. Pre-configured accounts allow backends to represent any needed state; the account becomes the test fixture.

Account Library Types

Account Type Represents Tests
New user, no device Fresh signup, pre-pairing Onboarding flows, setup prompts
Device connected, no data Just paired, awaiting first use Empty states, data collection prompts
Active user, 7 days Regular usage, recent data Standard dashboards, recent activity
Power user, 90+ days Long-term usage, rich history Historical views, trend analysis
Edge case: gaps in data Sporadic usage, missing days Gap handling, interpolation logic
Edge case: extreme values Unusual readings, outliers Boundary conditions, error states

Strategy 4: Visual AI for Hardware State Detection

Core Insight: Hardware state visible in UI, where vision outperforms selectors.

Hardware apps display device status through visual indicators—icons, colors, badges, animations. Traditional automation struggles interpreting these indicators; meaning depends on visual properties selectors cannot interpret.

Two Approaches

  • Symbol Recognition Over Color Detection: Colors are unreliable across device rendering differences and theme changes. Symbols remain stable. An icon showing a sun with a line through it means "off"; without the line means "on." Shape conveys meaning regardless of color.
  • Text Confirmation as Backup: Hardware state changes often display confirmation text: "Light turned on," "Device connected," "Sync complete." This text remains unambiguous and easily verified.

Strategy 5: Read-Only Testing Against Live Data

Core Insight: Some data cannot be convincingly faked; real usage produces unanticipated edge cases.

Seeded test data covers known scenarios. But hardware apps encounter patterns nobody anticipated—unusual usage sequences, rare environmental conditions, data combinations emerging only over months of real-world operation.

Implementation

  • Internal team members volunteer accounts linked to real devices they actually use
  • Tests constrain to read-only operations—viewing screens, checking data displays, verifying calculations
  • Tests run during safe windows (daytime for sleep tracking apps; when devices aren't actively in use)
  • No test ever modifies data, triggers device actions, or alters account state

Case Studies

Fi: From 2-3 Day Releases to Same-Day

Company Overview: Fi designs GPS smart collars for dogs. The app displays location, activity, sleep patterns, and enables owners to control collar LED lighting.

Challenge: Release validation required 2-3 days of testing with 12+ engineers manually verifying device interactions, data displays, and feature functionality. Testing capacity constrained release velocity.

Pie Implementation: Application mapping against layered testing architecture revealed 80%+ of user flows lacked hardware dependency. For flows requiring device data, backend team integration enabled test account seeding. For hardware state verification (LED status), visual AI detection was implemented.

Metric Before Pie After Pie
Release validation time 2-3 days Same day
Engineers involved in testing 12+ 1 QA lead + Pie automation
Automated test coverage Minimal Hundreds of tests
Test maintenance burden Constant firefighting Near-zero (self-healing)

"Pie is now an integral piece of our release process. If we were to split ways or something were to happen and we weren't able to get coverage for a week, I'm really not sure what we would do."

— Phillip Hunt, QA Lead, Fi

Lumo: Untangling a Testing Architecture

Company Overview: Lumo develops agricultural IoT—soil moisture sensors, irrigation controllers, and farm monitoring systems for farmers managing water usage.

Challenge: Testing was tangled. Firmware bugs, backend issues, and frontend problems surfaced together. Failure origin was unclear.

Pie Implementation: Testing was separated into three distinct layers with defined responsibilities and approaches:

Layer Responsibility Testing Approach
Firmware Device-level behavior Dedicated hardware team, physical devices
Backend API logic, data processing API testing tools (Postman, Runscope)
Frontend UI rendering, user experience Pie automation

"Creating a test prompt took one minute. If done manually, checking different webpage elements would take 30 minutes to one hour."

— Senior Software Engineer, Lumo

Smart Mattress Company: 111 Test Cases in 2 Hours

Company Overview: The smart mattress firm manufactures temperature-controlled smart mattresses. The app displays sleep scores, temperature graphs, health insights, and enables user settings adjustment.

Challenge: Testing sleep data visualizations required actual sleep data—someone sleeping on connected mattresses awaiting data accumulation. Manual test creation couldn't match development pace.

Pie Implementation: Pie's discovery process was run against their app without hardware context. The AI autonomously explored applications, identified features, and generated test cases. Discovery produced 111 test cases in approximately 2 hours.

111
Test Cases Generated
~2hrs
Discovery Time

"If we can get accounts for just looking at metrics without tapping action buttons, just clicking graphs... that could be valuable because it eliminates one entire testing class of graph verification."

— Engineering Lead, Smart Mattress Company

Getting Started

Implementation Steps

Step 1: Map Your Application

Categorize every user flow into the three tiers: Tier 1 (No Hardware), Tier 2 (Simulated Hardware), Tier 3 (Physical Hardware). Outcome: clear picture of what's automatable today, what becomes automatable with API work, and what stays manual. Most teams discover 70-80% falls into Tiers 1 and 2.

Step 2: Establish Baseline Coverage

Run Pie discovery against your application; let the platform explore autonomously and generate test cases for Tier 1 flows. Outcome: immediate test coverage for authentication, settings, profiles, and other hardware-independent functionality.

Step 3: Enable Device Simulation

Work with backend engineering to expose endpoints for creating test accounts with specific device states, seeding historical data, and bypassing hardware blockers. Outcome: test accounts become test fixtures; flows previously requiring devices become fully automatable.

Step 4: Build Your Account Library

Define device states, usage patterns, and edge cases that matter. Create dedicated test accounts for each scenario. Outcome: comprehensive scenario coverage without device manipulation.

Step 5: Add Visual State Verification

Identify hardware state indicators in your app. Configure Pie tests to verify these states using symbol recognition and text confirmation. Outcome: hardware state verification not depending on brittle selectors or unreliable color detection.

Step 6: Integrate and Iterate

Integrate Pie with CI/CD pipeline. Configure test runs on every build, PR, or release candidate. Outcome: continuous validation catching issues before production.

The Future is Autonomous

Hardware apps have earned their reputation as automation-resistant. Device state, timing variability, multi-layer complexity—these are real challenges.

But the teams we worked with proved something important: the right strategies make hardware testing automatable. Fi and Lumo didn't accept manual testing as inevitable. They found a different way.

Key Strategies Summary

  • Layered testing architecture separates device-dependent from device-independent functionality. Most hardware apps are 70-80% software fully automatable today.
  • API-driven simulation provides device data without devices. Applications don't know or care data origins.
  • Pre-configured test accounts turn scenarios into fixtures without device manipulation.
  • Visual AI interprets hardware state indicators through screen observation like humans do.
  • Read-only testing validates against real data patterns synthetic data cannot replicate.

Results Summary

Company Before After
Fi: Release Validation 2-3 days Same day
Lumo: Architecture Tangled layers Clean separation
Smart Mattress App: Test Generation Manual creation 111 tests in 2 hrs

The question isn't whether your hardware app can be automated. It's whether you're ready to try.

Ready to See It in Action?

Not ready to bet a release on a new tool? Run Pie on your staging site first. Drop in any web URL, walk away, and come back to a Readiness Score with real bugs and reproduction steps. No credit card. No sales call. Just results.

Book a demo with our team or visit pie.inc to learn more.

References & Bibliography

1. World Quality Report 2024. Capgemini, Sogeti, and OpenText. Comprehensive analysis of QA automation trends and industry challenges.

2. Fi implementation case study, November 2025.

3. Smart Mattress Company implementation case study, November 2025.

4. Lumo implementation case study, December 2025.

About Pie Labs

Pie is an autonomous QA testing platform built for modern engineering teams. Visit pie.inc to learn how Pie eliminates test maintenance, scales QA without adding headcount, and enables teams to ship with confidence.

For more information, visit pie.inc or book a demo.