GameTestAutomationExample
Some time ago I found some amazing work on test automation of unity games, but I got stuck on implementing it in our project.
The test example can be found here: GitHub
I was able to run the tests on flappy bird game and fiddled with some test scenarios. Then I wanted to use it in my own project and got stuck on the step that involves adding gameObjects to the ObjectLogger. After adding the objects I try to build and run the app but nothing gets logged so theres no way for the test script to do anything.
I would gladly contribute to the project with more examples and more precise instructions, but I just need to understand how to build my own project with object logging enabled.
@ujappelbe @rasmus-unity @shusso - any tips on that? :)
Answer by ujappelbe · Mar 30, 2017 at 10:56 AM
Hi @DonCordiale,
Are you using iOS or Android for your testing? On iOS you might need to do some additional work to enable the logging to syslog, there is more information here: http://answers.unity3d.com/questions/416675/get-debuglog-output-in-the-working-ios-build.html#answer-1271074
I'm glad to see interest in the project, I hope this helps.
Thanks for a fast reply @ujappelbe. I develop on a $$anonymous$$ac, and for this project I tried with Android development build. I think that the logging in general works just fine, I just can't see any logs from the ObjectLogger when I build my app and run it on an emulator.
The manual on GitHub stops on the step where we drag game objects to the object logger prefab. I'm not sure how to proceed later on. Do I just build the app and the logger should work or there are some other steps necessary to do before I build it?
I added a second gif which covers the rest of the process to the READ$$anonymous$$$$anonymous$$md. http://i.imgur.com/02sruZr.gif
You can see here the object getting logged when it becomes visible.
This is clean project where I only added the 'AutomationHelpers.unitypackage' file before starting the capture.
I hope this helps
Thanks for your reply @ujappelbe. I figured out this part before, when I opened the example project in unity and noticed that in the example uses static objects and the project that I'm working on uses dynamic objects and they just dissapear from the objectlogger prefab as soon as I do some in game action that switches from the gameplay to some menus or when I stop the gameplay in the editor.
In my case logging prefabs that are used to create those dynamic objects seems to be working, but there are some other issues like crashes etc. but I will have to work it out on my own.
Thanks again for sharing your knowledge.
Your answer
Follow this Question
Related Questions
Cannot read past end of stream, MemoryStream 1 Answer
Unity Test Tools Not Working 0 Answers
Testing Duration With Unit Tests 0 Answers