So I’ve spent my weekend trying to learn about automation tests. I understand that I can create them using one of two macros, but I don’t know how to implement something I want to do. I also just have some questions about testing in general.
Say I have an actor called AGrid. I would like to run a simple test where I make an empty map (I think you can do this with FAutomationEditorCommonUtils::CreateNewMap()), spawn an AGrid in that empty map, and check that everything is initialized correctly. I just can’t seem to make a version of this test that compiles.
Say I have an actor called ASquareGrid, with a function called AddTile(int x, int y, int z). Do I need to spawn a grid as described in the above paragraph, or is there a way to test the actor without spawning it in a map? Can I just declare ASquareGrid as a variable and call functions on it?
I recommend using the Engine’s tests as a base. I’ve been wanting to write an “up-to-date tutorial” for half a year now. I may find time to do so today and then post a link to it here.
Oh yeah, I was actually using that lol. Thanks, really good tutorial! Would you happen to know the difference between UE4’s EditorTests module and RuntimeTests plugins? I’m currently setting up my tests like that, but I’m not sure if the plugins are set up differently or if thats just a clean way of keeping those tests separate.
I think it’s just a way to keep them organized. Especially since Editor tests don’t need to be bundled with the Game, i.e. you can deactivate the module for those.