Chapter: Basic Principles of--appium Automation (seventh lecture)
Golden Sun Test Website:
Http://www.goldensunshine.cc/forum.php?mod=viewthread&tid=19&extra=page%3D2
Keywords in this issue:
Appium, cross-language cross-platform, Bootstrap
Main content and notes:
One, what is Appium
An automated testing framework that encapsulates uiautomator, or other test frameworks, across platforms (Linux, Mac, Windows), across languages (almost all of the languages I know, like Java, Objecet C, scripting language Python, Ruby, etc.)
Second, the demo
From the demo see How to write the automated test case, including a setup method, a Teardown method, and then TestCase.
In the Setup method, you need to set a series of parameters, including the file directory of the app files Appdir,app file name files app; is the Android test, set the "Device" "Android" property, set the package name, main Name of the activity (one of the tools under the SDK, AAPT dump badging +apk file) to get the name of the package name and activity
Finally, the most important is a driver object, later written by the user will use this driver, call driver.xxx method to write test case
This driver = new Swipeablewebdriver (New URL ("Http://127.0.0.1:4723/wd/hub"), capablities);
Need this driver to communicate with the server, and then this server again through the bootstrap and the mobile phone side communication (two layers in the interval, relatively thick, contact may not be good, so prone to some problems)
Specific schematic diagram:
Iii. the framework and the analysis of source code
1, uiwatchers--role: Monitor the ANR (app not response) or crashes, and then print the log out
2, Bootstrap--socket service object, is to encapsulate the uiautomator, and then through the "4723" Port for communication
3. androidelement--this is the class that gets the control
4, click--inherit from the handler, the operation of the asynchronous thread on the UI will use handler class, get to the control, not like Robotium put the control into a ArrayList inside, Instead, it executes directly (the operation is done by Uiautomator)
5. Methods of strategy--8 to get control
6, Driver--linux, Mac, and driver on Windows are not open source (this is the core)
Iv. Appium limit (compared with other products, can do automated testing of iOS, not one)
Appium supports ios,android and mobile web
Robotium supports Android and mobile web
Uiautomator Mobile web with support for anroid and coordinate points
These are the current mainstream, more learning more look, refueling!
1. Official website: www.goldensunshine.cc
2, Baidu Search: Golden Sunshine Test, find the golden Sun study Materials and official website, video.
3, the official Sina Weibo: Golden Sun Woody
4. Official qq:212260449
6, the official YY education channel: 74894998
7, the official CSDN technical information: http://blog.csdn.net/haorenmin2008
"Golden Sun Test" Android Automation-learning process: Appium principle Preliminary