Testing

FrameTrellis has three layers of automated tests, all driven by CTest and Qt Test:

LabelWhereWhat it covers
unittests/unit/rational time, frame rates and drop-frame timecode; the timeline model and every edit's boundary rules; project serialization, invalid and hostile documents, moved folders, failed saves; undo/redo, merging, the saved state and media commands; export validation, the helper protocol and the render-job state machine
integrationtests/integration/MLT/FFmpeg media probing (video, audio, stills, broken files), thumbnails, frame-accurate graph building, compositing, pillarboxing, opacity, fades, picture adjustments, gain/mute, offline media, producer caching; rendering to MP4 and verifying the result, cancellation, replacing existing files, refusing to overwrite sources, the helper process end to end; real-time playback, seeking, pausing and live updates
guitests/gui/the real QML interface driven by mouse and keyboard: first-run guide, importing with duplicate detection, appending, dragging and trimming clips, refused overlapping moves, split/undo/redo/delete shortcuts, Space playback, exporting from the dialog, save and reopen

Run them with:

ctest --preset linux            # all tests
ctest --preset linux -L unit    # only unit tests
ctest --preset linux -R engine  # tests whose name matches "engine"

Test media

No media files are stored in the repository. tests/support/media_fixtures.cpp generates them with MLT at test time: MP4 files with one solid colour per second and a sine tone, WAV files and PNG stills. Because the colours and tones are known, tests assert on real pixel colours and audio levels (for example, that the clip trimmed to the "green second" really shows green, or that a muted clip is silent).

Headless runs

All tests run without a display: CTest sets QT_QPA_PLATFORM=offscreen, the GUI test also uses QT_QUICK_BACKEND=software, and SDL_AUDIODRIVER=dummy gives playback an audio clock without a sound card. The GUI test isolates QSettings and application data from your profile.

Screenshots

The GUI test can save screenshots of the running application:

FT_SCREENSHOT_DIR=/tmp/shots ctest --preset linux -L gui

scripts/make-screenshots.sh does this with more varied media generated by FFmpeg and writes the optimised images used in the documentation and on the website.

Sanitizers and static analysis

cmake --preset linux-asan builds with AddressSanitizer and UBSan; CI runs the unit and integration tests that way. clang-tidy (configured in .clang-tidy) and clang-format run in CI as well.

What is not covered automatically

  • Real audio output devices (tests use SDL's dummy driver).
  • GPU-accelerated Qt Quick backends (tests use the software renderer).
  • Windows packaging on physical machines and macOS in general.
  • Manual exploratory testing of drag-and-drop from the operating system's file manager.