pebble
  • Tutorials
  • Get the SDK
  • Guides
  • Documentation
  • PebbleOS
  • Mobile App
  • Examples
  • Index 01
  • Community
  • Blog
  • More
Privacy
Cookies
Publish

PebbleOS

  • Overview
  • Contributing
  • Start here
  • Development
    • The pbl CLI
    • Build system
    • Emulator and simulator
    • Testing
    • Debugging
    • Conventions
  • System
  • Hardware
  • Community
  • Reference
  • Firmware API Reference

Testing

PebbleOS has two test suites, which check different things:

Unit tests

Integration tests

What

Individual modules, against fakes and stubs

The whole firmware, as it ships

Where

On the host

On the emulator, the native simulator or a watch

Written in

C, with clar

Python, with pytest

Lives in

tests/

tests/integration/

Run with

pbl test

pbl itest

Unit tests are fast and precise: they build a few firmware sources for the host, so a module’s behaviour can be checked in isolation, including rendering against reference images. Integration tests drive the running firmware from the outside, pressing buttons, comparing screenshots, reading logs and measuring current, so they catch what only shows up once everything runs together.

CI runs the unit tests on every change to the sources, and the integration tests on the three emulator boards, for both the normal and the recovery firmware. A lab watch runs them on real hardware as well.

Generated from PebbleOS 3a7b71785. This page is maintained in the pebbleos repository: docs/development/tests/index.md.