How to run tests that require Input?

Hello, so resently I downloaded unity testing tools and since I heard/read that they are so useful I desided to make a TDD project.

But I have a question:

How do I make integration tests that require input?

Like when the player presses the left arrow the character turns left? Or when the player kills 10 enemies the game ends?

Essentially, you don’t. What you’ll be wanting to do is to decouple your code from the actual input and instead rely on the results of the input. This can be done by separating all the non-Unity API code from that which does use the Unity API and then put a layer in-between the two. Then you can have a test object in your integration test which takes the place of the actual input.
The Unity team has a great blog post which goes into similar types of decoupling in decent detail here