Skip to content

Testing

The testkit: the snapshot runner that renders UIs on a hidden surface, the snapshot suite and the contract suites that check a backend, and the tools that compare renders. Learn: Testing your UIs, Testing a backend.

TypeKindSummary
BitmapFontContractSuiteclassThe contract tests of the drawing of bitmap fonts by a render bridge: whole texels and the same ink at every scale.
BorrowedTextureContractSuiteclassThe contract tests of the textures that a backend borrows from its host.
ContractDrawclassThe helpers of the contract suites, for contract tests of your own: a frame around a drawing, quads and vertices, a shader from a fragment stage, a pixel assertion.
GlslExportclassWrites every built-in shader of JOID translated to every GLSL dialect, to check a translation with the compilers of each dialect.
IBorrowedTextureBackendinterfaceA snapshot backend that can create, lend and inspect a texture of its host, for the borrowed texture suite.
ISnapshotBackendinterfaceA hidden surface on which a backend is registered, that the testkit draws on and captures.
IStateGuardBackendinterfaceA snapshot backend that can draw and set state like a host, for the state guard suite.
JarCheckclassStarts JOID from a packaged jar, opens a UI, draws 60 frames and exits with the result, for the jar checks of a backend.
RenderBridgeContractSuiteclassThe contract tests of a render bridge, run on your snapshot backend in a few seconds.
SnapshotAudioSourceclassAn audio source that plays nothing, so that snapshot tests need no sound device.
SnapshotBaselineclassRenders every snapshot scenario with a given snapshot backend into a folder, the baseline that the other backends are compared with.
SnapshotBridgeRestorerclassRemembers the bridges of every registry and later unregisters every bridge registered since.
SnapshotComparisonclassCompares the renders of several backends with those of a reference backend, and writes a report.
SnapshotDifferenceclassHow much two snapshot images differ: the number of pixels beyond the tolerance and the largest channel difference.
SnapshotEntryclassOne shot of a snapshot report: its name, its status, its different pixels and its two files.
SnapshotImageclassThe pixels of a snapshot, as opaque ARGB int values row after row from the top-left corner.
SnapshotReportclassWrites the HTML report of a snapshot run, with every shot next to its reference.
SnapshotRunnerclassRuns commands and scenarios on a hidden 1920×1080 surface with a manual clock, and returns the shots by name.
SnapshotSettingsclassThe system properties of a snapshot run: where the references and the renders go, and whether the references are recorded.
SnapshotStatusenumWhat happened to a shot in a snapshot run.
SnapshotSuiteclassThe snapshot tests of a backend: every scenario of the testkit, pixel for pixel against the references of the machine.
SnapshotUIBridgeclassThe UI bridge of the snapshot runner: a window UI bridge with a #323232 window background and an interface scale that the scenarios set.
SnapshotUrlAssetLocatorclassDownloads an http or https resource once into the snapshot area of the cache folder, so that later snapshot runs work offline.
SnapshotWindowBridgeclassThe window bridge of the snapshot runner, whose size, mouse, held keys, cursor and clipboard the commands set.
StateGuardContractSuiteclassThe contract tests of a render bridge that shares its graphics context with a host: every frame must look the same and give the host its state back, whatever the host left set.
StateTrapenumA state that a host may leave set before a frame of JOID, which StateGuardContractSuite sets to check that JOID draws the same anyway.

Report a problem with this page