今天這一節要來說明一下關於 MonkeyTalk 錄製測試腳本 - IDE 的安裝和使用教學。
相信大家還記憶猶新,前幾篇我們介紹過 MonkeyTalk Agent 的植入方法。如果是測試 Android 裝置就要植入 MonkeyTalk Android Agent 到 Apps 的程式碼中。如果是測試 iOS 裝置就要植入 iOS Agent,這些都還只是第一步。如果是要錄製測試腳本的話,這時候就要用到 MonkeyTalk IDE,而用 IDE 所錄製的腳本,是可以共用在 Android 和 iOS 的測試裝置,換句話說就是只要錄製一個腳本,就可以使用在這兩種不同的裝置上。
接下來我們就開始今天的說明:
Step 2: After download then unzip the file and copy folder "MonkeyTalkIDE" to C:\
Step 3: Double click "MonkeyTalkIDE.exe".
Step 4: Change "Workspace" to C:\monkeytalk\workspace then tick "Use this as the default and do not ask again" and click "OK".
Step 5: Create the first test case for Android.
File | New | MonkeyTalk Project
Step 6: Enter "Project name" as "Android_TestCase"
Step 7: Select "Android_TestCase" then select "New" and click "Script"
Step 8: Enter File name "Demo.mt" then click "Finish"
Step 9: Show toolbar
Window | Show Toolbar
Step 10: Configure MonkeyTalk IDE link to Android SDK.
Window | Preferences
Tips 10-1: Select "MonkeyTalk" then add SDK path from "Android SDK" then click "Apply" and "OK" to finish this setting.
Step 12: Open Eclipse to load the project "HelloWorld"
Download and import the project from this link zip file.
HelloWorld_Agent.7z
Tips 12-1: Please make sure MonkeyTalk Agent for Android has set up in this "HelloWorld" project.
Please refer to MonkeyTalk Agent (Android篇)
Window | Show Toolbar
Window | Preferences
Download and import the project from this link zip file.
HelloWorld_Agent.7z
Please refer to MonkeyTalk Agent (Android篇)
HelloWorld | Run As | 1 Android Application
Android_TestCase(Project Name) | reports | DETAIL-Demo.mt.html(Testing Script Name)
相信大家在安裝、使用和測試的過程中,一定會跟我一樣遇到許多問題,不過這些問題相信只要照著文章的步驟說明,會遇到的問題就會少很多,如果在過程中有遇到什麼問題,也歡迎大家直接在 Blog 留言發問,我將盡力的幫大家想辦法解決。
MonkeyTalk 的介紹就到這邊,完結篇!如果以後還有需要相關的說明,我們再來繼續討論,這一節就到這邊,我們下次見。
~ See you ~
參考出處:
http://www.eclipse.org/
http://www.cloudmonkeymobile.com/
http://developer.android.com/index.html
http://jpress.tw/android-dev2