Skip to content

com.stratkit.auto-play-test

Provides automatic Play Mode tests.

Assemblies: - Stratkit.AutoPlayTest: the runner. Simulates input on registered action providers, learns a baseline of outcomes and timings, and reports deviations. - Stratkit.AutoPlayTest.UI: registers the open views of the UiServices as providers, their actions found by reflection. - Stratkit.AutoPlayTest.Game: setup for a Stratkit game (GameAutoPlay): the match map as a provider, the game state queries of the runner (busy, map ready), and the gameplay loop (GameplayLoop) which plays a match through simulated input: constructs, produces, attacks, skips time. Game screens are told by an IGameplayUi of the game. GameAutoPlayCheats is what the cheat commands of a game call. - Stratkit.AutoPlayTest.Game.Editor: steps of the game auto-play tests (GameAutoPlayTestRunner): boot the game in play mode, wait for the lobby, run the test or the gameplay loop, learn the way to the map.

All assemblies of the package are compiled only with the ENABLE_AUTOPLAYTEST scripting define (define constraint), and the games guard their code using it with #if ENABLE_AUTOPLAYTEST: the feature is never part of a build without it. The game build workflows add ENABLE_AUTOPLAYTEST to builds having ENABLE_CHEATS, unless their enableAutoPlayTest option is false; live builds never get it.