Plugin for testing Bevy code in CI
What problem does this solve or what need does it fill?
Bevy (partially because it's based on ECS) is uniquely suited for writing tests. A test can just involve adding some plugins, using direct world access to spawn in some entities with componets, calling app.update() a few times, then checking that your components were updated as you expected.
It's very common for someone to want to run tests in CI. But it's not clear which plugins you should add for that – you don't want WinitPlugin because it doesn't work except from the main thread, so it's not suitable for tests (which would ideally all run on their own thread). RenderPlugin, which you are likely to want because bevy_rapier depends on it, complains about being unable to find a GPU when run in a gpu-less CI server.
What solution would you like?
A TestsPlugin for use when writing tests, that adds all the plugins besides the ones that really make no sense in CI, like WinitPlugin.
Ideally, plugins that require things like a gpu would have alternatives that do as much as is possible when no GPU is available, even if it's just adding resources and things like that. But, even just adding a plugin bundle that adds the ones I below would likely be a big help to new users!
Additionally, if #4934 were fixed, it would allow LogPlugin to be used in tests, which is required for logs to show up.
What alternative(s) have you considered?
Forking bevy_rapier to not fail when RenderPlugin isn't added, and adding MinimalPlugins, AssetPlugin, ScenePlugin, WindowPlugin, GilrsPlugin, TransformPlugin, HierarchyPlugin, DiagnosticsPlugin, InputPlugin, and AudioPlugin manually. But having to do that isn't very friendly to new users :D
Can't you just disable rendering like in this example https://github.com/bevyengine/bevy/blob/main/examples/app/no_renderer.rs ?
Just hide the line setting backends behind a ci or tests feature flag.