All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Added --get-stack-consumption option
- Added scenario navigation for review finishing with spinner
- Provide buld_directory from ledger_app.toml when searching for binary (lib_path)
- Detect error APDUs during navigation to have proper error APDUs exceptions instead of timeouts
- Only fail the test where elf file is missing
- Fixed sideload using main app SDK by assuming all sideloaded applications in tests are C applications
- Class
StatusWordswith default Status Words values, as defined in the SDK
- Fix navigation in functions
xxx_with_warningwith multiple warning screens for Nano on NBGL
- Add new parameter in
navigation_scenariofunctionsxxx_with_warningto specify the number of warning screens
- Fix APEX keyboards positions
- Fix APEX BUTTON_LOWER_LEFT coordinates
- Add two new devices: Apex_p and Apex_m
- Align libraries loading for swap standalone tests with library loading for eth plugin tests
log_apdu_fileoption allows to set the filename pattern when executing multiple tests
- yield true on async to notify the action has been completed (physical backends)
- minor bug fixes on the PhysicalDevice navigation flow
- OCR enhancements on physical backend to detect words
- Key presses shortcuts (y/n) to navigate through the ragger GUI with a physical backend
exchange_async_rawon the speculos backend can yield if the apdu has a response or not as a boolean
- Added toml as a dependency (requided in utils/misc.py)
- Enable to use both MAIN_APP_DIR and SIDELOADED_APPS options (required to perform Swap tests)
- Using
ledgeredDevices instead of localFirmware/FIRMWARES. Basicallyledgered.device.DeviceTypereplaces theragger.firmware.Firmwareenum, andledgered.device.DevicesreplacesFIRMWARES. ragger.firmware.Firmwareis now a proxy toledgeredtypes and prints deprecation messages.
- Use pytest builtin --log-level instead of custom --Verbose
- Fix scenario navigation regular expression matching partial words
- conftest:
--no-navoption to completely disable the navigation during the tests. - Retrieve
sdk_graphicsfrom elf file - Add new functions
review_xxx_with_warningto include the warning screen acknowledge - Adapt
NavigationScenarioDatafor Nano using NBGL
- Reviews navigation on touchable devices (Flex, Stax) no longer 'taps', but 'swipes'
- Upgrade PyQt5 to PyQt6
- Add missing method to physical device interface
- Reactivate logs like "Saving screenshot to image" (which were removed in v1.29.0)
- Added support for Python 3.13
- Use
--Verboseoption to increasepytestverbosity. It adds log timestamps, some test-specific logs, and the verbose option is forwarded to Speculos.
- Added --pki_prod option that can be forwarded to Speculos upon usage
- Fixed backend being instantiated even when the test needs a different setup
- Added support for different test setup
- Added support for Python 3.12
- SWIPE support for physical backend
- Drop support for Python 3.8
_actionhintelement location (covered previously by the snapshot image)- Physical backend -specific imports (
PIL,tesseract) are postponed to avoid raising when using Speculos only
- navigator:
Navigator.navigate_until_text_and_compareandNavigator.navigate_until_textnow accept asnap_start_idxargument, likeNavigator.navigate_and_compare.
- conftest: Added 'all_eink' option for the
--deviceargument to target Stax + Flex - conftest: Added a autouse fixture to skip unsupported devices
- firmware/stax: Choice List positions were no longer correct compared to latest NBGL evolutions
- Rust app: get target directory from cargo metadata (workspace compatible)
- firmware/flex: Wrong keyboard position
- firmware/flex: Added the suggestion buttons positions (used with keyboard)
- firmware/stax: Updated the suggestion buttons positions (used with keyboard)
- firmware/flex: Wrong keyboard position
- Use SWIPE_CENTER_TO_LEFT in Stax navigation scenario
- navigator: Now use Stax API_LEVEL_21 as layout for navigation
- REVERT conftest: Fixed '--device all': limit the tests to devices declared in the App manifest
- conftest: Fixed '--device all': limit the tests to devices declared in the App manifest
- conftest: Fixed '--device all' conftest option
- navigator: Moved review.tap coordinates on Stax from center to center left to avoid clicking on QR code button
- conftest: Overridable fixture to inject custom arguments into the Speculos client
- firmware/navigation: Adding swipe capabilities for Flex
- navigation: scenarios now use
Firmwareenum rather than strings
- backend: Adapting to new Speculos API
finger_touchfunction.
- navigator: fixed issue when using the custom_screen_text parameter
- Flex firmware & navigation
- firmware: 'stax' module is renamed 'touch', as it is no longer specific to the Stax device
- navigator: 'StaxNavigator' class is renamed 'TouchNavigator', as it is no longer specific to the Stax device
- firmware: deprecated properties
Firmware.has_balandhas_nbgl
- Speculos backend: if not specified, availability of API and APDU ports are checked to avoid collision
- navigator: New pytest fixture to navigate by scenario to simplify classic navigation operations
- Speculos backend: Properly fixed internal snapshot state desync compare screen with text
- Speculos backend: fixed internal snapshot state desync compare screen with text
- backend: add missing tick_timeout argument from physical backends
- firmware: stax: move
UseCaseSettings.previousfromBUTTON_LOWER_MIDDLEtoBUTTON_LOWER_LEFT
- conftest: Integrating Rust application binary paths
- conftest:
APP_DIRandLOAD_MAIN_APP_AS_LIBRARYare replaced by the optional parameterMAIN_APP_DIR. - firmware: stax: positions: Update settings exit for new SDK v15.2.0
- navigator:
BaseNavInsIDallows to create customNavInsIDwhile usingNavigatormethods without additional type conversion. - backend: Add optional argument to allow timeout in apdu exchange functions with default value of 5 minutes
- Fix search tree for main app binary in library mode
- Update search tree for main app binary in library mode
- Removing the
frozenattribute forExceptionRAPDUdataclass, as Python3.11contextlibneeds the exception class it throws to be RW.
- Update Ragger dependency versions (Speculos, LedgerComm, ledgerCTL), so that it can leverage recent features.
- Batch generator with the
SpeculosBackend:batchmethods which allows to spawn several Speculos client of the same app, with (if needed) different seed, RNG and/or attestation or user keys.
- SpeculosBackend: Removing
hostandportarguments, as they were modifying the client behavior, but not the server, so this feature probably never worked. The port can be changed through Speculos arguments:args=["--api-port", "9876"].
- interface: Adding RAISE_CUSTOM raise policy to allow custom definition of white-listed status.
- conftest: Add support for plugin testing
- backend/speculos - navigator: Allow navigation screen content comparison with regex.
- Requirements: Fail due to missing pytesseract only if really needed.
- CI: Remove CI job dependency to allow deployment if wanted
- Dependency: Update needed Speculos version
- firmware:use_case: Increase confirm time to 2.4 sec following SDK change
- base conftest : hotfix option "all_nano"
- base conftest : add an "all_nano" option for the device parameter
- physical backend gui : do not try to kill GUI process if it is not alive (causes error).
- firmware: Adding a proxy
Firmware.deviceproperty to ensure retro-compatibility with olderFirmwareusages. Previous change was breaking a lot of code.
- firmware: Removing the firmware version mechanism: as the device / version is embedded into each application ELF, Speculos alone can figure out how to emulate a device. Besides this, the version mechanism was only useful for the Stax graphical multi-version retrocompatibility, which is a niche usage not worth the complexity of the whole mechanism. Firmware is now an enum listing the currently supported devices (NanoS, NanoS+, NanoX and Stax).
- navigator: Restore
NavInsID.USE_CASE_REVIEW_CONFIRMcustom wait for screen change for cases where the app callio_seproxyhal_io_heartbeat()before next screen is displayed.
- speculos: Only pause ticker during navigation steps
- speculos: Default touch duration changed from 0.5sec to 0.1sec
- speculos: Control the ticker allowing to avoid any race issue when comparing screen and accessing OCR result
- speculos: Bump minimal speculos version to 0.2.5
- import: Fix from 1.8.1 was not wide enough. Exception was filtered on 'QtCore', but they could also throw as 'QtWidgets'.
- import: Feature developed in this branch forced all Ragger installation to have PyQt5 and its dependencies installed. This is no longer the case.
- backend: Physical backends (
LedgerComm,LedgerWallet) can now pop a GUI in order to guide a user performing tests on a physical device.
- package: Version is not longer hardcoded in sources, but inferred from tag then bundled into the
package thanks to
setuptools_scm
- configuration: Add a mechanism to specify the app dir where Speculos should search for the directory that holds the application compilation artifacts.
- backend: StubBackend
- backend: Add a mechanism to survive USB stack reboot (
handle_usb_reset()) - backend: ledgerwallet/ledgercomm: Add a mechanism to check appname and open app at backend instantiation
- backend: Drop double logging of RAPDU on LedgerCommBackend and LedgerWalletBackend
- conftest: Set navigator fixture scope to backend one
- backend: Add
wait_for_home_screen(),wait_for_text_on_screen()andwait_for_text_not_on_screen(). - navigator: Add
WAIT_FOR_SCREEN_CHANGE,WAIT_FOR_HOME_SCREEN,WAIT_FOR_TEXT_ON_SCREENandWAIT_FOR_TEXT_NOT_ON_SCREENinstructions.
- backend: speculos: Based
wait_for_screen_change()on screenshot comparison where it was previously based on OCR content. - backend: speculos: Remove internal screen content reference update from
get_current_screen_content(). - navigator: Add a call to
wait_for_screen_change()innavigate()similarly to what is done innavigate_and_compare(). - navigator: Remove
USE_CASE_STATUS_WAITinstruction, it should be replaced byUSE_CASE_STATUS_WAIT.
- navigator: Sanitize the behavior of
USE_CASE_REVIEW_CONFIRMnavigation instruction.
- navigator: Add USE_CASE_STATUS_DISMISS, this allows to dismiss the status instead of waiting for its end with USE_CASE_STATUS_WAIT.
- conftest: add configuration and pytest options that allow a custom seed to be used for speculos.
- Dependency: Use speculos>=0.1.224 to avoid issues when running in slow setup.
- backend: speculos.py: Strip empty text events from Speculos. This avoid false detection of screen change in navigation.
- conftest: new module that provides a base_conftest for unifying conftest features
- tests: the existing tests now use the new conftest module
- CI: the CI now uses the reusable workflows for boilerplate compilation
- tests: all tests are passing for Stax
- misspelling fixes and new CI
- template: conftest.py: Target nanosp release 1.0.4 which is now supported by speculos
- backend: speculos.py: Do not pass
--sdkargument anymore, this enforce using either last speculos supported SDK or app elf file with metadata. - template: conftest.py/usage.md: Enable full Stax support
- Dependency: Use ledgerwallet>=0.2.3 to fix protobuff version issues
- Dependency: Use speculos>=0.1.202 to enable support for Last Stax firmware
- firmware/stax: Classes using
MetaScreencan now declare their own__init__without it being overridden
- backend/speculos : improved reliability of wait_for_screen_change
- firmware/stax : the "Suggestions" positions are shifted by Y+75px in order to fit with BOLOS suggestion buttons, which are under the typing text area, not above.
- navigator: Don't clean already existing snapshots when running
navigate_and_compare()throughnavigate_until_text_and_compare().
- template: conftest.py: Use session scope for firmware and backend fixtures
- template: conftest.py: Targeted device must be specified with new
--devicerequired option. - unified naming of the Ledger Stax product: from
fatorfatstacksto stax
- requirements: Removed the dependency on protobuf package
- conftest:
--log_apdu_file <filename>option - firmware:
Firmware:have_baglandFirmware:have_nbglproperties indicates which graphical interface the firmware implements. - navigator: Add USE_CASE_ADDRESS_CONFIRMATION_TAP
- navigator:
add_callback()method to register callbacks after Navigator initialization
- navigator:
NavInsarguments ofnavigate()and higher-level methods can now also beNavInsID, which will automatically be converted toNavIns(with no argument for the callback)
- Fatstacks
UseCaseHomeExt - navigator: Improve navigation by waiting screen changes instead of hardcoded sleeps
- navigator:
navigate_and_compare(): add optional snap_start_idx parameter - navigator:
navigate_until_text(): take a list of validation instructions and check last screen
- Initial version