1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-03 23:30:04 -04:00

Add kittest.toml config file (#7643)

* part of https://github.com/rerun-io/rerun/issues/10991

---------

Co-authored-by: lucasmerlin <8009393+lucasmerlin@users.noreply.github.com>
This commit is contained in:
Lucas Meurer
2025-11-25 14:51:18 +01:00
committed by GitHub
parent 8b8595b45b
commit a19629ef4a
9 changed files with 273 additions and 17 deletions

View File

@@ -38,6 +38,33 @@ fn main() {
}
```
## Configuration
You can configure test settings via a `kittest.toml` file in your workspace root.
All possible settings and their defaults:
```toml
# path to the snapshot directory
output_path = "tests/snapshots"
# default threshold for image comparison tests
threshold = 0.6
# default failed_pixel_count_threshold
failed_pixel_count_threshold = 0
[windows]
threshold = 0.6
failed_pixel_count_threshold = 0
[macos]
threshold = 0.6
failed_pixel_count_threshold = 0
[linux]
threshold = 0.6
failed_pixel_count_threshold = 0
```
## Snapshot testing
There is a snapshot testing feature. To create snapshot tests, enable the `snapshot` and `wgpu` features.
Once enabled, you can call `Harness::snapshot` to render the ui and save the image to the `tests/snapshots` directory.