搭建Eclipse+UIAutomator 环境

本文详细介绍了如何在Eclipse环境中搭建UIAutomator,用于移动端测试。首先需要安装Android SDK并设置环境变量,接着在Eclipse中安装ADT插件,配置ADT后指定Android SDK目录。然后创建Java Project,添加所需jar文件,创建UIAutomator测试项目,并编写JUnit Test Case。最后,通过命令行工具将测试用例推送到设备上并运行。
摘要由CSDN通过智能技术生成

在前面一篇文章中已经介绍了如何搭建 Java+Eclipse环境,现在介绍下如何在Eclipse基础上搭建UIAutomator环境,进行移动端测试。

第一步:安装Android SDK

Link:http://developer.android.com/sdk/installing/index.html . 因为是在Eclipse下,我选的是Stand-alone SDK Tools。进行Download 和Install.

指定Android SDK的安装目录,为了方便使用Android SDK包含的开发工具,我们在系统环境变量中的Path设置Android SDK的安装目录下的tools目录。
  在Android SDK的安装目录下,双击“SDK Manager.exe”,打开Android SDK Manager,Android SDK Manage负责下载或更新不同版本的SDK包,我们看到默认安装的Android SDK Manager只安装了一个版本的sdk tools。


设置环境变量:ANDROID_HOME = D:\Program Files (x86)\Android\android-sdk

设置Path:Path= ;%ANDROID_HOME%\tools


第二步:在Eclipse中安装ADT(AndroidDeveloperTools) 插件及配置

SDK Tools Integration
Many of the tools that you can start or run from the command line are integrated into ADT. They include:
    Traceview: Allows you to profile your program's execution (Window > Open Perspective > Traceview).
    android: Provides access to the Android SDK Manager and AVD Manager. Other android features such as creating or updating projects (application and library) are integrated throughout the Eclipse IDE.
    Hierarchy Viewer: Allows you to visualize your application's view hierarchy to find inefficiencies (Window > Open Perspective > Hierarchy Viewer).
    Pixel Perfect: Allows you to closely examine your UI to help with designing and building. (Window > Open Perspective > Pixel Perfect).
    DDMS: Provides debugging features including: screen capturing, thread and heap information, and logcat (Window > Open Perspective > DDMS).
    adb: Provides access to a device from your development system. Some features of adb are integrated into ADT such as project installation (Eclipse run menu), file tran

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值