We appreciate any contributions to this effort!
We recommend using the npmjs package in order to receive updates/fixes.
This project is under active development - API and usage guidelines are very likely to change
Integration and end-to-end testing of Ledger Apps is a manual and time consuming process. We believe that the Ledger apps ecosystem is lacking an adequate approach with respect to testing. The Zemu Framework is our solution for this problem. Under the hood, Zemu uses Ledger's project speculos. It's currently being used in every Ledger App built by Zondax, among many others (such as Ethereum one built by Ledger team).
Zemu is an emulation and testing framework for Ledger Nano S/S+/X/Stax/Flex devices.
- Minimal configuration + Docker based
- Speculos/Qemu based emulation
- Container pooling for improved test performance
- Easy JS/TypeScript API
- Vitest / Jest / Mocha compatible
- Parallelized testing
- Abstracted device control (buttons, reset, etc.)
- Navigate thru screens and take screenshots of them
- Support for all Ledger devices (Nano S/S+/X/Stax/Flex)
- Enhanced error handling with detailed APDU status codes
- Debugging (support for CLion and vscode, even mixed C/Rust)
npm install --save-dev @zondax/zemu
# or
pnpm add -D @zondax/zemu
import Zemu from '@zondax/zemu'
const sim = new Zemu(APP_PATH)
await sim.start({ model: 'nanos' })
// Interact with your app
await sim.clickRight()
await sim.clickBoth()
// Take screenshots
const screenshot = await sim.snapshot()
// Clean up
await sim.close()
Check our documentation and quickstart at https://docs.zondax.ch
We are Zondax, a company pioneering blockchain services. If you want to know more about us, please visit us at zondax.ch