HaywireInteractive / OnAllFronts-Public

UE5 MilSim FPS / RTS Game (formerly ProjectM)
MIT License
115 stars 22 forks source link

Switch all functional tests to use "Set Console Variable" instead of "Execute Console Command" to set console variables to avoid test pollution from console variables #998

Closed Kalchev89 closed 1 month ago

Kalchev89 commented 1 month ago

@Leroy231 found that in functional tests if instead of using "Execute Console Command" to set console variables if we use "Set Console Variable from Float/Boolean/Integer" (screenshot below), those console variables will automatically reset at the end of the test so that we won't get test pollution. We should switch to using those in all functional tests.

But keep in mind if we're executing a console command instead of setting a console variable we should still use "Execute Console Command". An example of this is pm.KillSoldiersOnTeam 1, that's a console command, not a variable.

Make sure to rebase before starting as @Leroy231 already fixed one test.

Image