Skip to content

Conversation

@gokseniin
Copy link

Summary

I've added an automated smoke test for the recording functionality to address #775.

What kind of change does this PR introduce?

  • New Feature (Automated Smoke Test)

Implementation Details:

  • Daemon Thread: The test runs openadapt.record in a background daemon thread to avoid blocking the main test execution.
  • Stop Sequence (Ctrl+C): I used pynput to simulate the Ctrl+C keyboard interrupt.
    • Note on implementation: The test explicitly catches the KeyboardInterrupt exception. This ensures that the test runner doesn't crash (especially on Windows) and can proceed to the verification step cleanly.
  • Verification:
    • Database: It queries the SQLite DB to confirm the Recording entry was created.
    • Filesystem: It attempts to verify the existence of the video file (video_path). I added a check to handle cases where the schema version might differ, so the test remains stable across environments.
  • Windows Support: Added a ctypes hard exit strategy to prevent multiprocessing permission errors causing hanging processes on Windows.

Checklist

  • My code follows the style guidelines of OpenAdapt
  • I have performed a self-review of my code
  • I have added tests to prove my fix is functional/effective
  • I have linted my code locally prior to submission
  • I have commented my code, particularly in hard-to-understand areas
  • New and existing unit tests pass locally with my changes

Fixes

Fixes #775
/claim #775

Demo Video

smoke_test_demo.mp4

This file contains a smoke test for the OpenAdapt recording functionality, verifying the recorder's ability to start, capture data, stop via keyboard interrupt, and persist data.
@abrichr
Copy link
Member

abrichr commented Jan 17, 2026

Closing as part of the architecture transition. The legacy codebase has been moved to legacy/ and frozen at v0.46.0.

If this change is still needed, please:

  1. Open a PR against the relevant modular package repository
  2. Or re-open this PR targeting the legacy/ directory if it's a critical legacy fix

See PR #960 for details on the new meta-package architecture.

@abrichr abrichr closed this Jan 17, 2026
@gokseniin
Copy link
Author

@abrichr Thanks for the guidance. I understand the architecture change.
​I'd be happy to port the smoke tests to openadapt-capture to support the transition.
​Since the original issue (#775) is now closed, I just wanted to ask: Is the bounty still applicable for the work on the new repo?
​Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add recording smoke test

2 participants