5

I tried to automate a Unity3d game(android apk) with testdroid tool. The problem is, the tool is unable to identify the elements in the game, instead performing "clickOnScreen()", it blindly clicks on the screen

solo.clickOnScreen(solo.toScreenX(0.665f), solo.toScreenY(0.452f));

I am unable to get the required results with this sort of automation.

What is the best tool used for game automation? How does it work?

Can anyone tell me how to automate in testdroid in a better way or suggest another tool which could detect the game element or any other procedure that works well for game automation.

Thanks

ReggieB
  • 8,100
  • 3
  • 38
  • 46
user2679146
  • 81
  • 1
  • 1
  • 3
  • You can try Unity Test Tools https://docs.unity3d.com/Manual/testing-editortestsrunner.html But that's more of unit & integration tests, not UI testing – buxter Jul 20 '17 at 19:04

1 Answers1

5

From the code example it seems that you are using Robotium test automation framework which isn't really the best fit for testing mobile games (lots of graphical/OpenGL ES content). I would recommend using something more modern (e.g. Appium framework) with some advanced graphical recognition mechanism (e.g. image recognition/OCR feature). Here is one example done for Clash of Clans (by Supercell):

The Basics of Mobile App, Game and Web Testing

and another example for Hill Climb Racing:

How to Use Image Recognition for Mobile Game Testing

Hopefully these helped.

  • Thanks for your response. I have tried that one as well, But mine is a Card-Collection game. There will be so many objects with same dimensions and symbols which make it hard to recognize with that technique. – user2679146 Sep 14 '15 at 15:40