メインコンテンツまでスキップ

Eggplant コマンドラインオプション

このページでは、Eggplantコマンドを使用してコマンドラインからEggplant Functionalスクリプトを実行するときに使用できるさまざまなオプションについて説明します。このコマンドはEggplant Functional GUIを起動します。runscriptコマンドを使用してこれらのオプションのいずれかを実行すると、Eggplant Functional GUIが起動することに注意してください。runscriptコマンドについて詳しくは、Runscript コマンドオプションを参照してください。

これらのコマンドに関する詳細情報は、コマンドラインからの実行を参照してください。

ノート

コマンドラインからこれらのコマンドを実行するときにrunscriptまたはEggplantコマンドで渡すオプションを説明するために、引数という用語を使用しています。他にもオプションフラグという用語があります。

スクリプトへの入力として渡す値を指すために、パラメータという用語を使用しています。コマンドラインから実行するときにスクリプトにパラメータを渡す方法についての詳細は、パラメータの渡し方を参照してください。

-AlertOnError

使用法: ブール値。 (はい/いいえ) スクリプト実行が失敗した場合にアラートを表示するかどうかを指定します。

例:

Mac

/Applications/eggPlant.app/Contents/MacOS/Eggplant -RunOnLaunch /Users/Alex/appTests.suite/Scripts/test3.script -AlertOnError yes

Windows

"C:\Program Files\eggPlant\eggPlant.bat" -RunOnLaunch "C:\Users\Alex\Documents\MyTests.suite\scripts\test3.script" -AlertOnError yes

Linux

Eggplant -RunOnLaunch ~/Documents/appTests.suite/Scripts/test1.script -AlertOnError yes
ノート

このパラメータは、Eggplant Functional一般設定の接続が失敗したときにアラートを表示するを上書きします。

-AlertOnFailedConnections

使用法: ブール値。 (はい/いいえ) 接続が失敗した場合にアラートを表示するかどうかを指定します。

例:

Mac

/Applications/eggPlant.app/Contents/MacOS/Eggplant -RunOnLaunch /Users/Alex/appTests.suite/Scripts/test3.script -AlertOnFailedConnections yes

Windows

"C:\Program Files)\eggPlant\eggPlant.bat" -RunOnLaunch "C:\Users\Alex\Documents\MyTests.suite\scripts\test3.script" -AlertOnFailedConnections yes

Linux

Eggplant -RunOnLaunch ~/Documents/appTests.suite/Scripts/test1.script -AlertOnFailedConnections yes
ノート

このパラメータは、Eggplant Functional一般設定のスクリプト実行が失敗したときにユーザーに警告するを上書きします。

-AutoShowRunWindow

使用法: スクリプトまたはスイートスケジュールへのパス。 Eggplant Functionalを起動すると、指定されたスクリプトまたはスイートスケジュールが呼び出されます。

例:

Mac

/Applications/eggPlant.app/Contents/MacOS/Eggplant -AutoShowRunWindow yes

Windows

"C:\Program Files\Eggplant\Eggplant.bat" -AutoShowRunWindow yes

Linux (bash shell)

Eggplant -AutoShowRunWindow yes
ノート

-AutoShowRunWindowフラグは、Eggplant Functional一般設定のスクリプトが実行されたときに実行ウィンドウを前面に表示するを上書きします。

-DefaultDocumentDirectory

使用法: ディレクトリへのパス。 スイートの相対ファイルパスの開始ディレクトリを指定します。たとえば、ヘルパースイートのパスなどです。

例:

Mac

/Applications/eggPlant.app/Contents/MacOS/Eggplant -DefaultDocumentDirectory ~/Documents/EggplantDocs

Windows

"C:\Program Files\Eggplant\eggPlant.bat" -DefaultDocumentDirectory "C:\Users\Elizabeth\Documents\eggPlantTests"

Linux

Eggplant ~/Documents/appTests.suite/Scripts/test1.script -DefaultDocumentDirectory ~/Documents
ノート

これは、Eggplant Functional一般設定のデフォルトスイートディレクトリと同じです。

-open

使用法: ブール値。 (はい/いいえ) スクリプトが実行されたときに実行ウィンドウを前面に表示するかどうかを指定します。

例:

Mac

/Applications/eggPlant.app/Contents/MacOS/Eggplant -open ~/Documents/appTests.suite
/Applications/eggPlant.app/Contents/MacOS/Eggplant -open ~/Documents/appTests.suite/scripts/testscript.script

Windows

"C:\Program Files\eggPlant\Eggplant.bat" -open "C:\Users\Alex\Documents\appTests.suite"
"C:\Program Files\eggPlant\Eggplant.bat" -open "C:\Users\Alex\Documents\appTests.suite\scripts\testscript.script"

Linux

Eggplant -open ~/Documents/appTests.suite
Eggplant -open ~/Documents/appTests.suite/scripts/testscript.script

-param (-p)

使用法: 単一のパラメータ。 -param引数は、スクリプトにパラメータを渡します。スクリプトの名前の前または後に-paramを使用できます。-param文字列は、スクリプト内の各パラメータの前になければなりません。-p形式は、同じパラメータの省略形です。それらを交換可能に使用できます。

ノート

-param引数(最後に「s」が付かないもの)は、古い-paramsパラメータと同じではありません。

例:

Mac

/Applications/eggPlant.app/Contents/MacOS/Eggplant -RunOnLaunch ~/Documents/appTests.suite/Scripts/test1.script -param "SUT1" -param "phonebook.txt"

Windows

"C:\Program Files\eggPlant\Eggplant.bat" -RunOnLaunch "C:\Users\Alex\Documents\MyTests.suite\scripts\test1.script" -param "SUT1" -p "phonebook.txt"

Linux

Eggplant -RunOnLaunch ~/Documents/appTests.suite/Scripts/test1.script -p "SUT1" -p "phonebook.txt"

-paramValue (-pv)

使用法: 単一のパラメータ式。 -paramValue引数(またはその省略形である-pv)は、リスト、プロパティリスト、または他の複雑なパラメータ値をスクリプトに渡すために使用できます。SenseTalkのValue関数が、スクリプトに渡す前に提供された値に適用されます。

-paramValue-paramを自由に混在させて呼び出すことができます。-paramまたは-pの後に続く値は、スクリプトにリテラル文字列として渡されます。paramValueまたは-pvの後に続く値は、SenseTalk式として評価され、評価された値がスクリプトに渡されます。

例:

Mac

/Applications/eggPlant.app/Contents/MacOS/Eggplant ~/Documents/appTests.suite/Scripts/test1.script -paramValue "[SUT1,SUT2]" -paramValue "{x:34, y:125}"

Windows

"C:\Program Files\eggPlant\Eggplant.bat" "C:\Users\Alex\Documents\MyTests.suite\scripts\test1.script" -p "SUT1" -pv "[1,2,3,5,9]"

Linux

Eggplant ~/MyTests.suite/Scripts/test1.script -paramValue "the international time" -pv '{name:"Joe User", id:"143G-2", password:"top secret"}'

-QuitAfterRun

使用法: ブール値(はい/いいえ) 指定されたスクリプトまたはスイートスケジュールを呼び出し、その後Eggplant Functionalを終了します。終了をキャンセルするには、Eggplant Functionalを開き、メインメニューからEggplantを選択し、Quitを選択します。次に、Cancel Quitボタンをクリックします。

例:

Mac

/Applications/eggPlant.app/Contents/MacOS/Eggplant -RunOnLaunch /Users/Alex/Docs.suite/Scripts/myTests/test2.script -QuitAfterRun yes

Windows

"C:\Program Files\Eggplant\Eggplant.bat" -RunOnLaunch "C:\Users\Alex\Documents\MySuite.suite\Scripts\test2.script" -QuitAfterRun yes

Linux

Eggplant -RunOnLaunch ~/Documents/appTests.suite/Scripts/test1.script ~/Documents/appTests.suite/Scripts/test2.script -QuitAfterRun yes

-ReopenDocuments

使用法: ブール値(はい/いいえ) Eggplant Functionalを起動する際に、最後に開かれたスイートとスクリプトを再度開くかどうかを指定します。

例:

Mac

/Applications/eggPlant.app/Contents/MacOS/Eggplant -ReopenDocuments No

Windows

"C:\Program Files\Eggplant\Eggplant.bat" -ReopenDocuments no

Linux

Eggplant -ReopenDocuments no
ノート

このパラメータは、Eggplant Functionalの一般設定前回のセッションからスイートを再開するを上書きします。

-RestoreConnection

使用法: ブール値(はい/いいえ) Eggplant Functionalを起動する際に、前回のセッションからの接続を復元するかどうかを指定します。

例:

Mac

/Applications/eggPlant.app/Contents/MacOS/Eggplant -RestoreConnection yes

Windows

"C:\Program Files\Eggplant\Eggplant.bat" -RestoreConnection yes

Linux

Eggplant -RestoreConnection yes
ノート

このパラメータは、Eggplant Functionalの一般設定前回のセッションからの接続を再開するを上書きします。

-RunOnLaunch

使用法: スイートまたはスクリプトへのパス。 -open引数を使用して、Eggplant Functionalをコマンドラインからスイートが開いた状態で起動します。具体的なスイートへのパスを-open引数に含めます。-open引数は特定のスクリプトも開くことができます。これを行うには、具体的なスクリプトへのパスを含めます。

例:

Mac

/Applications/eggPlant.app/Contents/MacOS/Eggplant -RunOnLaunch /Users/Alex/Alex_Tests.suite/Schedule1

Windows

"C:\Program Files\Eggplant\Eggplant.bat" -RunOnLaunch "C:\Users\Alex\Documents\Eggplant\MySuite.suite\Schedule1"

Linux

Eggplant -RunOnLaunch ~/Documents/appTests.suite/scripts/test1.script

-ScaleRemoteScreen

使用法: ブール値。デフォルト:オフ。 モバイル(iOSまたはAndroid)デバイスのリモート画面を、ScreenScaleRatio設定で指定されたもの以外の場合は、元のサイズの50%に縮小します。この設定は、コマンドラインフラグとしても渡すことができます。VNC接続でのみ使用可能です。

Important

コマンドラインで一度設定すると、この設定は、その接続のEggplant Functional接続リスト項目に永続化されます。これは、scaleRemoteScreenをオフに設定する別のコマンドライン呼び出しを実行するか、Eggplant Functional接続インターフェイスのScreen Scale Ratioチェックボックスの選択を解除することで、再設定することができます。

例:

Mac

/Applications/Eggplant.app/Contents/MacOS/Eggplant -RunOnLaunch ~/Desktop/MySuite.suite/Scripts/ToRunFromCLI.script -scaleRemoteScreen yes -host 10.1.11.111 -port 5902 -password securePassword

Windows

“C:\Program Files\Eggplant\Eggplant.bat” -RunOnLaunch “C:\Users\Dave\My Documents\MySuite.suite\Scripts\ToRunFromCLI.script” -scaleRemoteScreen yes -screenScaleRatio 3 -host 10.1.11.150 -port 5901 -password securePassword

Linux

eggplant -RunOnLaunch ~/Documents/TestSuite.sute/Scripts/ToRunfromCLI.script -scaleRemoteScreen yes -screenScaleRatio 2 -host 10.1.11.182 -port 5902 -password securePassword

-ScreenScaleRatio

使用法: 整数値N。 画面のスケール比を1:N に決定します。ここで、N はユーザーによって提供される整数値です。この設定は、the ScaleRemoteScreen設定によって使用されるスケールを変更します。デフォルトの_N_ 値は2です(リモート画面を50%にスケーリング)。

例:

Mac

/Applications/Eggplant20.app/Contents/MacOS/Eggplant -RunOnLaunch ~/Desktop/Elizabeth.suite/Scripts/ToRunFromCLI.script -scaleRemoteScreen yes -scaleScreenRatio 3 -host 10.1.11.120 -port 5901 -password securePassword

Windows

“C:\Program Files\Eggplant\Eggplant.bat” -RunOnLaunch “C:\Users\Dave\My Documents\MySuite.suite\Scripts\ToRunFromCLI.script” -scaleRemoteScreen yes -screenScaleRatio 4 -host 10.1.11.111 -port 5902 -password securePassword

Linux

eggplant -RunOnLaunch ~/Documents/TestSuite.sute/Scripts/ToRunfromCLI.script -scaleRemoteScreen yes -screenScaleRatio 3 -host 10.1.11.210 -port 5901 -password securePassword