docs/TESTING

Nebble Testing Guide

Nebble has a comprehensive test suite that verifies both the Nim-to-C compilation pipeline and the API functionality across all Pebble platforms.

Test Tasks

The test suite is managed via nimble. The following tasks are available:

1. nimble testUnit (Host Tests)

Runs unit tests on the host machine (macOS/Linux) using minimal mocks for Pebble types.

2. nimble testExample (Build Matrix)

Builds all example applications for all 7 Pebble platforms.

3. nimble test (Full Suite)

Runs testUnit followed by testExample. This is the CI entry point.

Adding New Tests

Unit Tests

Add new test files to tests/.

Integration Tests (Templates)

The testExample task uses CLI templates (hello_world, simple_watchface) to verify compilation across all 7 platforms.

Manual Testing

For UI behavior and runtime checks, manual testing on the emulator is required.

  1. Build an example: nebble build --platform basalt
  2. Install: nebble install --emulator basalt
  3. Verify behavior in the QEMU window.