Robotium應用與Android自動化測試的研究

來源:互聯網
上載者:User

 

以後打算做android自動化測試,今天發現了一個很不錯的工具,以後回去研究一下:

下面是下載的地址

http://code.google.com/p/robotium/downloads/list

 

這是配置方法:

一、確保環境

1.已經安裝eclipse

2.Eclipse已經配置好android相關環境

3.存在已經建立模擬器

 

二、步驟

1.啟動Eclipse執行New --> Project --> Android Project --> Create Project from existing sample --> NotePad將內建的例子匯入進來.

2.在官方down欄下下載三個檔案,兩個是所需要的jar包,另一個是notepad的測試例子

(當前最新的是2.1Featured,這裡就不提供下載串連了版本更新的還是比較快的)

3.然後執行File --> Import --> Existing Project into workspace --> Select archive file --> ExampleTestProject_v2.1.zip將例子匯入進來(如果錯誤可能需要你在這個項目上將剛才說需要的兩個jar匯入project --> Properties --> Java Build Path --> Add (external) Jar)

4.右鍵選擇剛才匯入的test例子執行Run As --> Run As Android JUnit Test.

如果沒有意外的話會自動啟動模擬器並且運行起來了.

作者 h0222

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.