Skip to main content

qamule-pytest-dispcap

Case-level Android display recording for qamule-pytest.

Usage

Register the devices through qamule-pytest, then select the devices to record with --dispcap-device:

uv run pytest \
	-p qamule_pytest.plugin \
	-p qamule_pytest_dispcap.plugin \
	--device primary:emulator-5554 \
	--dispcap-device primary:display=0:size=1920x1080:bitrate=2.5M:fps=15

--dispcap-device may be repeated for multiple named devices. Its format is:

--dispcap-device NAME[:display=ID[,ID...]][:size=WIDTHxHEIGHT][:bitrate=RATE][:fps=FPS]

NAME must be an existing qamule-pytest device name. The bundled dispcap.jar is deployed once per selected device at session start. Use --dispcap-jar PATH to override it.

The plugin reuses the uiautomator2 device and adbutils transport created by qamule-pytest; it does not create a second device connection or set a device port. Omit --device-port to use uiautomator2's default, or configure that option on qamule-pytest when a non-default port is required.

Each selected device records from before fixture setup until after fixture teardown. Outputs are written under the normal qamule-pytest case artifacts:

pytest-artifacts/<session>/<case>/dispcap/<device>.mp4
pytest-artifacts/<session>/<case>/dispcap/manifest.json

The manifest records the effective capture settings, ADB command, timing, test outcome, and per-device errors. Deploying or starting a capture is best effort: a failure for one device does not fail the test or stop captures for other selected devices.

Retention and Circuit Breaker

Use --dispcap-passed-remove to remove each recorded device MP4 after a passed case finishes. The case manifest remains and marks each successfully removed file with deleted_video: true. Failed and skipped cases retain their videos.

The circuit breaker avoids recording repeated short cases that are unlikely to produce useful video. It is enabled by default and can be tuned with:

--dispcap-circuit-breaker-seconds SECONDS
--dispcap-circuit-breaker-consecutive COUNT
--dispcap-circuit-breaker-recover-consecutive COUNT

Defaults are 5.0 seconds, 1 short case to open, and 1 long case to recover. When open, a case does not start dispcap and its manifest records recording.status = "skipped" with reason "circuit-breaker-open". A skipped case that runs for at least the threshold contributes to recovery for later cases.

The package uses the qamule-pytest uiautomator2 device for JAR deployment. Its adbutils transport supplies the raw streaming shell connection and heartbeat port forwarding.

Real-device smoke test

The real-device test records a configured device for 60 seconds, then verifies the generated MP4 and manifest. Set the device serial before running it:

QAMULE_PYTEST_DISPCAP_REAL_SERIAL=emulator-5554 \
	uv run pytest packages/qamule-pytest-dispcap/tests/test_real_device_recording.py -q

The test is marked real_device and skips when the environment variable is not set.

Metadata

Release files for qamule-pytest-dispcap 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qamule-pytest-dispcap 0.1.2
File Size Uploaded Provenance
qamule_pytest_dispcap-0.1.2.tar.gz 43.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for qamule-pytest-dispcap 0.1.2
File Interpreter ABI Platform
qamule_pytest_dispcap-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 87.1 kB

Release files / qamule_pytest_dispcap-0.1.2.tar.gz

Download URL qamule_pytest_dispcap-0.1.2.tar.gz
Size 43.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5ab08d83f4ee284c4d10e2a1919af0e926167054144ec6dc2b19053a26699618
BLAKE2b-256 checksum
How to use checksums
e29f9237aaccadcf673f8fa6860a16367434975c1e164a02f00efe3d73cdf4f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / qamule_pytest_dispcap-0.1.2-py3-none-any.whl

Download URL qamule_pytest_dispcap-0.1.2-py3-none-any.whl
Size 43.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
61baf87a13d92b6f3d6bd5631f4c25816d2845a4e6b2681779277193ec4a6ceb
BLAKE2b-256 checksum
How to use checksums
4d834b6e2c7e735f6efb1403519f0146c5a42eb1ba90617e3c32adffb263dd61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for qamule-pytest-dispcap 0.1.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page