Friday, April 20, 2012

The Journey to Android Automation

Guys,

This was ANNOYING... I spent 4 hours trying to configure this damn Robotium project to work with my Cyborg framework... damn this was tough, and I'm not done yet.

Some conclusions...

  1. You cannot add same apklib as a dependency to both the tester project and target project!
  2. If you have a dependency you would like in both the tester project, and the  target project, be sure, that the tester project depends on the  target project/jar (Not apklib!!!), and while at it, make sure the dependency is been imported by the  target project.
  3. Sometimes while trying to debug the tester project, I placed some breakpoints, at the test case constructor, and the running halt, but without any stacktrace, as if the debugger failed to connect to the UI, although the program halt at the break point, Solution: restart Eclipse.
  4. The tests are not been mapped for execution, Solution: These guys are not serious, in order to define a test, the name of the method must start with the word 'test' explicitly, oh yeah, and an annotation to define some properties for the test... you see because an annotation cannot be extended, and because there are different implementation for a 'Test' then the commonality they have came up with is to start the name of the frigging method with the word 'test', here is an alternative Another annotation called @Test, it would be a revolution.
  5. The class loading process is different. In any Android app developed, the classes of the project itself, and the classes of its dependencies, are loaded lazily, while the Robotium app, loads all the project, and its dependencies classes at launch.
After long 10 hours of work I finally managed to debug the automation project, and hit a break point... from now on the process should be as simple as developing anything else.

Update:


My Cyborg framework, now fully supports scenario recording, and scenario automation executor, together giving me an invaluable power to turn my app users, together with a crash report server, to be my private QA, lets say that this should cover 80% of the cases...

No comments:

Post a Comment