-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce kittest for automated UI testing and git-lfs for UI snapshot handling #8182
Conversation
Web viewer built successfully. If applicable, you should also test it:
Note: This comment is updated whenever you push a commit. |
Latest documentation preview deployed successfully.
Note: This comment is updated whenever you push a commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm very excited to get this in!
}); | ||
}); | ||
} | ||
|
||
pub fn run_simple(&self, egui_ctx: &egui::Context, func: impl FnOnce(&ViewerContext<'_>)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should have a docstring. I also don't understand the naming.
It's more like the previous run
should be called run_ui
, and this run_test
or just run
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this even need to be pub
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm reshuffling/improving things here. I'm expecting that this will further evolve when we better integrate this with kittest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this even need to be pub?
Yeah, since we use it in re_time_panel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we have:
run
(does just the basic non-ui thing, takes aFnOnce(&ViewerContex)
)run_in_egui_central_panel
(legacy thing that use__run_test_ctx
and takesFnMut(&ViewerContext, Ui)
). This should probably go away in the future.- some form of a
run_with_kittest()
(for a future PR)
All of these should handle_system_command()
, so we can get rid of run_and_handle_system_commands()
.
I'm updating this PR according to this.
edit: for clarity, we use run
in the existing kittest test, by manually rolling the kittest stuff in the closure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm very excited to get this in!
@rerun-bot full-check |
Started a full build: https://github.com/rerun-io/rerun/actions/runs/12067771530 |
@rerun-bot full-check |
Started a full build: https://github.com/rerun-io/rerun/actions/runs/12068811066 |
@rerun-bot full-check |
Started a full build: https://github.com/rerun-io/rerun/actions/runs/12072739603 |
@rerun-bot full-check |
Started a full build: https://github.com/rerun-io/rerun/actions/runs/12073470333 |
@rerun-bot full-check |
Started a full build: https://github.com/rerun-io/rerun/actions/runs/12073556187 |
@rerun-bot full-check |
Started a full build: https://github.com/rerun-io/rerun/actions/runs/12073654214 |
@rerun-bot full-check |
Started a full build: https://github.com/rerun-io/rerun/actions/runs/12074809976 |
### Related - Related to #8182 ### What Introduce a new helper to manage and visualise failed kittest snapshot tests using Rerun. ``` pixi run snapshots --help # view all failed snapshot pixi run snapshots # remove all failed snapshot temp files pixi run snapshots --clean # only view (or clean) snapshot for that crate pixi run snapshots -p re_time_panel ``` https://github.com/user-attachments/assets/c2ad63be-ff85-4235-a161-a359ff540d89
What
BUILD.md
check_large_files.py
to verify that all PNGs are indeed handled bygit-lfs
.main
to cover for the UI snapshot testsNOTE: I (@abey79) repeat: introduce git-lfs to the repo.
Checklist
main
build: rerun.io/viewernightly
build: rerun.io/viewerCHANGELOG.md
and the migration guideTo run all checks from
main
, comment on the PR with@rerun-bot full-check
.To deploy documentation changes immediately after merging this PR, add the
deploy docs
label.