很多時候需要開模擬器來測試客戶用不同裝置的瀏覽狀況,
這時候可以從cmdline直接下以下指令比較方便
open -a Simulator.app
星期三, 4月 29, 2020
星期四, 4月 23, 2020
[Eggplant] 透過命令行的runscript指令來執行suite的測試
在透過EPF撰寫完相關的suite後,在不同主機上執行suite,就不用再開EPF了。
只要透過runscript指令即可呼叫。
Eggplat->Perference->Run,接著按install runscript in /usr/local/bin即可
只要透過runscript指令即可呼叫。
首先先安裝runscript指令(這樣就免除需要執行完整的路徑)
Important: For Mac installations of Eggplant Functional version 18.0 and later, the path to call the runscript command has changed to /Applications/Eggplant.app/Contents/MacOS/runscript.
[Eggplant] 使用shell指令執行Java Jar
測試如何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
//存放shell輸出的東西
set destinationFile to "/Users/bigd/Downloads/shellOutput.txt"
//Users/bigd/Downloads/eggplant_cmd
shell "java -cp /Users/bigd/Downloads/eggplant_cmd/JarDemo.jar com.test.jardemo.TestJar 'Hello World' 'Ken' >" & destinationFile
put file destinationFile into shellOutput
//LogSuccess file destinationFile
log shellOutput
//砍掉檔案
delete file destinationFile
參考