This directory contains comprehensive documentation for the Ethereum Ledger application test suite.
- test_overview.md - Complete overview of all test functionalities
- quick_reference.md - Quick reference guide for test files
- glossary.md - Ethereum concepts and terminology reference
- details/ - In-depth documentation for individual test files with parameters and configurations
The Ethereum Ledger app test suite uses:
- Ragger: Python testing framework for Ledger applications
- Speculos: Ledger device emulator for automated testing
- pytest: Python testing framework
- Basic Operations - Address retrieval, settings, configuration
- Transaction Signing - Standard and blind transaction signing
- Token Standards - ERC-20, ERC-721, ERC-1155
- Message Signing - EIP-191 and EIP-712
- Ethereum 2.0 - Staking operations, withdrawals, consolidations
- Advanced Features - Generic Clear Signing (GCS), transaction check, trusted names
- External Chains - Clone chain support
- Privacy Operations - Hardware cryptographic operations
To understand what functionality is tested:
- Read test_overview.md for comprehensive documentation
- Check quick_reference.md for a quick lookup table
- Explore details/ for in-depth test configuration and parameter details
All tests use the Ragger testing framework which provides:
- Backends: Support for Speculos emulator and physical devices
- Navigation: Automated UI interaction (button presses, swipes, taps)
- Screenshot Comparison: Visual regression testing
- Scenario Management: Reusable test scenarios
- Device Support: Nano S Plus, Nano X, Stax, Flex, Apex
The Speculos emulator simulates Ledger devices for testing:
- Accurate ARM processor emulation
- Display rendering
- Button/touch input simulation
- APDU communication
- No actual cryptographic security (faster for testing)
Each test typically follows this pattern:
- Setup: Initialize app client and backend
- Provide Context: Supply network info, token metadata, security descriptors
- Create Transaction/Message: Build the data to sign
- Navigate UI: Simulate user interaction
- Verify: Check signature validity and expected behavior
Common pytest fixtures used across tests:
backend: Speculos or hardware backendnavigator: UI navigation helperscenario_navigator: High-level navigation scenariostest_name: Unique identifier for screenshots- Various parameter fixtures for test variations
For detailed instructions on running tests, including command examples, device options, and advanced usage, see ../usage.md.