We need input automation

And input recorder
To auto play games for days
Plug and play, no code necessary

Input recording/replay tests are very fragile, which limits their usefulness quite significantly - if you record a play through of your level, then every time a designer moves a platform or tweaks an enemy position, you have to redo the recording. Each recording is also only testing one specific path through the game, which is usually pretty poor state space coverage for the time investment.

So, can you explain more about your use case? What problem do you think input recording and playback would solve for you?

These tests happen after level designs are locked so this dimension of fragility does not exist.
Behavior is deterministic enough that play sessions should be similar in duration.
If it's too nondeterministic I add [Test] or [TestTrigger("cheat") in front of the class that turns on infinite money and invulnerability. Due to the nature of the game the enemies will be in the same areas so if I record the play sessions without moving the camera I will get relevant framerate information and since it's wave based memory leaks will show up if they exist.
So the purpose of this testing is check memory leaks, major game logic regression and framerate regressions.

oh and it's to test on consoles.

OK, I see.

Are you using the new input system?

Not at the moment but input is decoupled so I could use it if such record/playback mechanism is planned or available on it.

So the new input system actually comes with a sample package that demonstrates input recording and playback:
6135230--669182--upload_2020-7-26_20-41-59.png

There's a bit of documentation about how the technique works. So I think this would be the best place to start - it's not "no code necessary" because you'll still need to figure out how you want to integrate it into your project and workflow, but almost all the heavy lifting is done for you already.

I think it should also be totally possible to use the InputEventTrace/ReplayController types from inside a [UnityTest], if you want to do that - you can start playback and then just yield in a loop until the .finished property returns true.

1 Like

Any ETA for when the new input system is in 2018.LTS?

It's not coming to 2018 LTS - it depends on core engine changes which were made in the 2019 codeline, and back-porting them is too risky for an LTS branch.

1 Like

Thanks for the info.
I'll see what the impact of witching to 2019 is on the framerate, as you know 2019 regressed in performance by quite a wide margin so if that's too much for good old switch I'll roll in my own input recorded.