(The testing of applications under Android system should be a new field now. Many materials used on the Internet in this field are based on white box testing, usually based on JUnit framework and android in Android SDK Test and other namespaces, but there is a condition that it is necessary to use the source code of the program to provide a test access point, but this is not practical in many software enterprises. Many test engineers work in a completely black box, and can hardly touch the source code. Most white box tests are ended by developers themselves. Recall that the black box test automation under Windows previously used the framework based UI Automation automation test framework provided by Microsoft (the requested version is above framework 3.0, that is, the VS.NET2008 development environment). It is easy to use for those who are good at C #. I also wrote a lightweight automation framework based on UI Automation, which will be introduced in future blog posts. Can I do something similar to UI Automation in the Android operating system? Surprisingly, Android's permission control is very clean, and data access between different programs can only be achieved through similar functions of Intent and contentprovider. That is to say, it is almost impossible for the automated program you developed to run in Android to capture elements such as controls on the AUT (Application under Test) interface that was running at that time (the term is quoted from UIAutomation, which is a bit stiff when translated into elements, so it is not translated), and you can't get a reference to the active activity at that time (as of this post, you haven't found a way to get this reference for the time being). No way to go? Can you walk inside the simulator and outside? Maybe.......
Preliminary Exploration of Android Automated Test.doc
Codepub Download Description.txt)