winit icon indicating copy to clipboard operation
winit copied to clipboard

Add integration testing

Open notgull opened this issue 1 year ago • 2 comments

winit is for all intents and purposes tested either by hand or in prod. We should have integration tests run in CI to make sure that there aren't any regressions in our code, as well as to reduce the burden on maintainers to test the code.

The X11 backend can be tested using xvfb, and Windows generally doesn't have an issue with running heedlessly. Android can be tested using the Android virtual device that comes with the Linux image and iOS can be tested via the iOS simulator on the macOS image. Web should also be pretty easy to test with a headless browser. I'm not so sure about the other platforms.

notgull avatar Jun 09 '23 05:06 notgull

I'm not sure what exactly is possible to simulate on other backends in CI, but for Web you can use WebDriver to basically do everything. I've used fantoccini with great success in the past.

I think it would be nice to potentially integrate stuff like that into winit-test?

daxpedda avatar Jun 09 '23 07:06 daxpedda

Linking https://github.com/rust-windowing/winit/pull/3593#discussion_r1543486525:

for the purpose of integration tests, we should probably have some sort of mechanism to [run a closure shortly inside of the event loop] more easily.

madsmtm avatar Mar 28 '24 18:03 madsmtm