egui icon indicating copy to clipboard operation
egui copied to clipboard

Integration testing/event injection

Open svenstaro opened this issue 2 years ago • 4 comments

I didn't find anything about this in this whole project which is odd so I think the following should be considered a feature request.

There's currently no documented (or even possible?) way to do integration testing/event injection/instrumentation for the purposes of integration testing. It's probably possible to abuse the new accessibility features for that like in other frameworks but it would still be good to have an official way for doing this for people that want to test their UIs.

svenstaro avatar Oct 20 '23 20:10 svenstaro

Wouldn't that be the same as any other integration? In which case you could follow the instructions in https://docs.rs/egui/0.23.0/egui/index.html#integrating-with-egui.

YgorSouza avatar Oct 21 '23 05:10 YgorSouza

It might be, but this issue is about documenting the flow for integration testing in an obvious manner. I'll give it a shot and maybe make a PR.

svenstaro avatar Oct 21 '23 05:10 svenstaro

It might be, but this issue is about documenting the flow for integration testing in an obvious manner. I'll give it a shot and maybe make a PR.

Consider the Imgui test engine here: https://github.com/ocornut/imgui_test_engine. It seems like something similar should be on the roadmap.

drewmiller avatar Jul 22 '24 09:07 drewmiller

I'm also confused about what to do for continuous integration.

xiyuzhai avatar Aug 07 '24 22:08 xiyuzhai

Some automated testing of an egui app would be great, and I think the best approach might be to interface with accesskit, both for reading the location of widgets and for automating interaction with them. That way the same code can be reusable across GUI toolkits (i.e. not be egui specific)

emilk avatar Aug 27 '24 09:08 emilk