nvda-addon-testkit
End-to-end testing for NVDA add-ons, against a real NVDA, in CI.
Your add-on's logic can be unit-tested with stubs. What cannot be stubbed is whether it installs, registers, and behaves inside NVDA itself. This kit provisions a disposable portable NVDA, installs your add-on into it, and lets pytest drive it.
def test_my_addon_announces_itself(nvda, addon_under_test):
before = nvda.speech.index()
nvda.keys.press("NVDA+shift+m")
assert "my add-on is ready" in nvda.speech.wait_for("ready", timeout=10, since=before).text
nvda.log.assert_no_errors()
Install
pip install nvda-addon-testkit
Configure
[tool.nvda-testkit]
addon-bundle = "dist/my-addon-*.nvda-addon"
nvda-channel = "stable"
Run in GitHub Actions
jobs:
e2e:
runs-on: windows-2025
steps:
- uses: actions/checkout@v5
- uses: zirekhq/nvda-addon-testkit@v1
with:
nvda-channel: stable
- run: pytest tests_e2e/ -v
What you get
| Fixture | What it gives you |
|---|---|
nvda |
a connected client, reset between tests |
addon_bundle |
the path to your built .nvda-addon |
addon_under_test |
that bundle, installed and enabled, NVDA restarted |
| Namespace | Use it for |
|---|---|
nvda.speech |
what NVDA asked to say, and waiting for it |
nvda.braille |
the raw text sent to the braille display |
nvda.keys |
sending gestures through NVDA's own input pipeline |
nvda.config |
reading and writing NVDA's configuration |
nvda.log |
structured log records, and assert_no_errors() |
nvda.addons |
two-phase install, remove, and state |
Requirements
Windows to run the tests. NVDA is downloaded automatically — you do not need one installed, and nothing touches an NVDA you already have.
Tests run serially: only one NVDA can own a desktop session, so pytest-xdist with more than one worker is refused rather than silently producing nonsense.
Developing the kit itself
The host side is fully testable on Linux against a scriptable double:
pip install -e ".[dev]"
python tools/build_spy.py
pytest # host and spy unit tests, any platform
pytest tests_e2e/ -v # real NVDA, Windows only
nvda-testkit doctor # check this machine
Licence
GPL-2.0-or-later.
Metadata
Release files for nvda-addon-testkit 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nvda_addon_testkit-0.1.1.tar.gz | 94.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nvda_addon_testkit-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 143.0 kB
Release files / nvda_addon_testkit-0.1.1.tar.gz
| Download URL | nvda_addon_testkit-0.1.1.tar.gz |
|---|---|
| Size | 94.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e2893d9db169433af68e977b4fd5172d4954d939a30b638847e76fc7ed231287
|
|
BLAKE2b-256 checksum How to use checksums |
f264f6fbf714386bc9b27e03009e3c5471afa932effbf5092f7f96aaf7befabb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / nvda_addon_testkit-0.1.1-py3-none-any.whl
| Download URL | nvda_addon_testkit-0.1.1-py3-none-any.whl |
|---|---|
| Size | 48.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9607ee7ba9b756874f49a71bea9ace484ab23366752f49ecc49d6edac2585fb5
|
|
BLAKE2b-256 checksum How to use checksums |
fe33c4d6c2c5d3c7b933d3cc5ea1e3adc04ffd665b2531350f2363079e3bbf2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency log