[Android automated testing] 02. Environment configuration of athrun

Source: Internet
Author: User


I. First, configure the most basic environment

Knowledge preparation + Environment configuration for Android Automated Testing
(Click to view details)

Ii. Download athrun
  1. Select a location for storing code on the local machine dir
  1. Right-click dir
  1. SelectSVN checkout
  1. In the pop-up dialog box, the first itemURL of repositoryEnter the corresponding address in the input box below:

    • Http://code.taobao.org/svn/athrun/trunk/android
  1. ClickOKDownload
  1. Waiting for download to complete
  1. The framework is the main code of the framework, and the agent is the auxiliary framework running on the PC. The example directory contains two apps, an android testing project that uses athrun to test the two apps. The tools directory contains some other auxiliary framework tools.
Iii. Import code into eclipse
  1. Run eclipse
  1. ClickFileOption
  1. ClickImport
  1. In the displayed dialog box, selectGeneralUnderExisting projects into Workspace
  1. ClickNext
  1. In the displayed dialog box, clickBrowseSelect the root directory of the downloaded project path
  1. Finish
  1. Repeat steps 2 to 7 to import all framework, agent, main_demo_app, cross_demo_app, and test_demo to eclipse.
4. Run the sample test project
  1. If a compilation error occurs after the project is imported, the compilation error is eliminated first, mostly because of Java build path. For details, refer to issues.
  1. Display the android labels that are helpful for debugging in Eclipse:

    1. SelectWindowsOption
    2. SelectShow View
    3. Select the required tag from the level-2 menu, as shown in figureDevices,Logcat
  1. Select the device to use

    1. Real Machine
    2. Simulator
    3. Note: To avoid the trouble, the simulator should select an SD card above 56 m, and the real machine should also insert the SD card. The default log4j log is recorded in the SD card. (It has been changed. If no SD card is available, it is stored on the mobile phone)
  1. Run main_demo_app and cross_demo_app
  1. Run test_demo. Note that most use cases only require the framework to run normally. However, some use cases (test methods in the virtualdevicetest class) must first run the agent on the PC side. Otherwise, the agent cannot run normally.
5. Use athrun to compile your own test project
  • If you see this, congratulations, you will be out of the new hand village soon.
  • If you have any questions when using athrun, do not hesitate to: Issues (Click here)
  • If you want to develop your own game rules, join us now: Contact tazen (trademanager or email: taichan@taobao.com)
  • Secret
From the above example: Workshop.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.