Overview of AR and 3D rendering regression tests
mainSceneView uses four layers of real-rendering tests located in samples/android-demo/src/androidTest/ to catch visual regressions automatically:
DemoRenderingScreenshotTest(3D demos): Launches 3D demos via deep-link, waits for a duration, and compares screenshots against goldens inandroidTest/assets/render-goldens/using UiAutomator.ARDemoPlaybackSmokeTest(AR demos): Replays MP4 fixtures fromandroidTest/assets/ar-recordings/usingARSceneView(playbackDataset = file), takes a single screenshot after a fixed wait, and compares it to goldens inandroidTest/assets/ar-render-goldens/.ARPlaybackScreenshotTest(Frame-indexed AR regression): Replays bundled ARCore recordings and captures rendered frames at specific, fixed ARCore frame indices (f=30, 60, 120, 180). This ensures deterministic testing regardless of emulator load, comparing results to goldens inandroidTest/assets/ar-screenshot-goldens/.ARReplayHarnessTest(Autonomous AR replay harness): Provides breadth by driving every AR demo inDemoCategory.AUGMENTED_REALITYthrough a bundled recorded session to ensure no crashes occur. It outputs a machine-readablear-qa-summary.json.
Note: Tests must run on a real device or a hardware-accelerated emulator. SwiftShader CI will crash on Filament pixel readback. Failed diff images are dumped to /sdcard/Android/data/io.github.sceneview.demo/files/render-test-output/.