# Pos Tests

> POS unit testing patterns (WooPosCoroutineTestRule, runTest, advanceUntilIdle, mockito-kotlin, event bus mocking, analytics verification). Use when writing, editing, exploring, debugging, or reviewing unit tests for POS (WooPos*) code. NOT for main store app tests — use the `store-tests` skill instead.

- Skill: `woocommerce/pos-tests` (Agent Skill)
- Install (CLI): `npx skillmds@latest add woocommerce/pos-tests`
- Raw SKILL.md: https://api.skillmd.com/api/skills/woocommerce/pos-tests/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- Author: woocommerce (https://skillmd.com/u/woocommerce)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/woocommerce/pos-tests

---


# POS Unit Tests

@docs/pos-testing.md

## Workflow

1. Read the class under test to understand its dependencies and state management
2. Find existing tests in the same package for patterns to follow
3. Test location: mirror main source path under `src/test/` within `ui/woopos/`
4. Write the test class following the POS conventions in the testing doc above
5. Run the test: `./gradlew :WooCommerce:testWasabiDebugUnitTest --tests "*.ClassName"`

