星期二, 2月 21, 2023
[Eggplant] iOS Gateway 授權問題
星期六, 8月 07, 2021
[Eggplant] SenseTalk JSON資料操作
JSON已經是普遍的資料交換標準,可以簡單跟不同程式間作為溝通的橋樑。
SenseTalk提供JSONFormat/JSONValue二個方法來讓用戶使用
JSONValue
將json string轉換到json object於sensetalk使用
PS:要注意json字串要有雙引號,否則會解析錯誤
MockDataFromExcel "PM","ETS_PM_0008"
put the result into mockTicket
log mockTicket
put JSONValue(mockTicket) into ticketInfoWithJSON
log ticketInfoWithJSON's reserveNo
2021/8/8, 2:36:12 PM Log {"carType":"標準車廂", "count":"1", "date":"2021/07/30", "depature":"14:46", "end":"台中", "full":1, "fullSubTotal":"700", "no":"651", "reserveNo":"06264014", "seat":"window", "start":"台北", "subTotal":"TWD 700", "trainTimeType":">60", "type":"單程"}
2021/8/8, 2:36:12 PM Log 06264014
JSONFormat
put JSONFormat(ticketInfoWithJSON) into ticketInfoWithJSONString
log ticketInfoWithJSONString
當然也可以在把json object轉回string回存,中文也可以正常編碼
2021/8/8, 2:36:17 PM Log {
"carType": "\u6a19\u6e96\u8eca\u5ec2",
"count": "1",
"date": "2021/07/30",
"depature": "14:46",
"end": "\u53f0\u4e2d",
"full": 1,
"fullSubTotal": "700",
"no": "651",
"reserveNo": "06264014",
"seat": "window",
"start": "\u53f0\u5317",
"subTotal": "TWD 700",
"trainTimeType": ">60",
"type": "\u55ae\u7a0b"
}
星期六, 7月 17, 2021
[Eggplant] Functional | 基本指令記錄-常處理商業邏輯會用到的
記錄每次錄製都會再查一下的指令集
List 操作
insert testScript after failTestScripts
星期四, 7月 08, 2021
[Eggplant] Functional 關閉預設的執行錯誤alert視窗
如果想要在執行eggplant functional錯誤提示訊息框,避免中斷測試,可以至偏好關閉(Prefermance )
Alert user when script execution fails: Selected by default. Select this checkbox to see an alert dialog box when a script fails. (This option does not apply to scripts that are run as part of a schedule.)
星期三, 6月 24, 2020
[eggplant] 客戶問題: 無法透過RDP連線處理
方法一
To enable RDP connection debug logs:
1. Create an environment variable in Windows on the EPF machine - WLOG_LEVEL and give it a value DEBUG.
2. Create a script in EPF that connects to a SUT using its name in the Connection List:
Connect “WIN-DS-EGGPLANT-SC”
Log ConnectionInfo()
Log “Waiting for 30 seconds…”
Wait 30
Disconnect
3. Run the script in cmd using runscript:
runscript.bat --commandlineoutput yes C:\CodeRepository\Suite-1.suite\Scripts\ConnectSmartCardTest.script
4. Copy the cmd output to a text file.
方法二
The RDP DLLs that come with the newer versions of Eggplant Functional are different from the ones that come with version 18. There are some security restrictions on the SUT machines that do not allow the connection from EPF.
To try to overcome this, please try the following:
Try entering the hostname of the SUT instead of its IP address and see if it makes a difference. If not, try the following:
1. Quit Eggplant Functional.
2. Open a cmd prompt and go to the EPF installation directory.
3. Enter the following command:
defaults write Eggplant -rdpNlaSecurity NO
4. Open EPF again and try to connect.
5. If that doesn't help, quit EPF again and try the following command:
defaults write Eggplant rdpRdpSecurity NO
星期二, 6月 16, 2020
星期一, 5月 18, 2020
[eggplant] IE webdrive無法連線
星期四, 4月 23, 2020
[Eggplant] 透過命令行的runscript指令來執行suite的測試
只要透過runscript指令即可呼叫。
首先先安裝runscript指令(這樣就免除需要執行完整的路徑)

[Eggplant] 使用shell指令執行Java Jar
MacBook-Pro-8:eggplant_cmd bigd$ java -cp JarDemo.jar com.test.jardemo.TestJar "Hello World" "Ken"
輸入參數0:Hello World
輸入參數1:Ken
星期三, 1月 08, 2020
[Eggplant] shell cmd 執行window batch
http://docs.testplant.com/ePF/SenseTalk/stk-system-interaction.htm
星期一, 11月 11, 2019
[Eggplant] 【進階語法】ScreenPart提昇你的OCR的辨識速度
如果想要再提昇速度,可以在每次搜尋目標時,
定義搜尋的區塊(searchRectangle ),
可以加速整個Script的執行
定義ScreenPart函數
[Eggplant] 使用eggplant functional連結Selenium進行自動化測試(三):取得網頁Table的數值,以wiki百科為例
[Eggplant] 使用eggplant functional連結Selenium進行自動化測試: 安裝於windows
那使用window的客戶就更單純了~真是幸福呀!箊
只要到eggplant下載官方的WebDriverServerSetup.exe安裝包(安裝精靈),
一步接一步就會安裝完,Selenium Server了,不過WebDriver也是要另外下載(參考先前的文章)。
下載資訊
https://www.eggplantsoftware.com/eggplant-functional-downloads懶到到官網下載頁面的話請至以下連結
http://downloads.testplant.com/downloads/WebDriverServerSetup.exe
安裝完後要啟動在windows的選單就可以發現啦:D
星期日, 11月 03, 2019
[Eggplant] 使用eggplant functional連結Selenium進行自動化測試(二):建立連線
PS:此文章內容已包含所需的環境建置
啟動你的Selenium Server
selenium-server -port 4444
建立一個新的連線
[Eggplant] 使用eggplant functional連結Selenium進行自動化測試(一):安裝 mac測試環境
系統限制
運作方式
SenseTalk <==> Selenium Server <==> Browser Drivers <==> Web Page
前置環境建置
安裝homebrew
進入/usr/bin目錄安裝homebrewruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"





