Runscript Command Line Options

This page explains the different options you can use when you run Eggplant Functional scripts from a command line using the runscript command. This command runs scripts without launching the Eggplant Functional GUI application. The information here applies to Mac, Windows, and Linux operating systems.

To add multiple options, insert a space before each one. For more information about these commands, see Running from the Command Line. To invoke scripts using the Eggplant command, see Eggplant Command Line Options.

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. You might need to update tests created in earlier versions of Eggplant Functional to prevent errors. You also can click the Install runscript in /usr/bin/local button in Eggplant > Preferences > Run Preferences to add the runscript command to your user path. This allows runscript to be called from any directory via the command line.

If you're running Eggplant Functional on a Mac and using a version older than 18.0, the runscript command path remains /Applications/Eggplant.app/runscript.

Note: We use the term arguments to describe the options you pass with the runscript or Eggplant command when you run those commands from the command line. Other terms you might be familiar with include options and flags.

スクリプトに入力情報としてパスする値を指す用語、パラメータを使用します。スクリプトをコマンドラインから実行するときにスクリプトにパラメータをパスする詳しい情報については、パラメータをパスするをご覧ください。

-CommandLineOutput

用途:スクリプトログ(実行ウィンドウのログエリアに表示されるデータを出力するかどうかをコントロールします。

Valid values: yes or no. To output script logs, set the -CommandLineOutput argument to yes. To turn off this output, set the -CommandLineOutput argument to no.

例:

Mac (bash shell):

/Applications/Eggplant.app/Contents/MacOS/runscript /Users/Alex/appTests.suite/Scripts/test3.script -CommandLineOutput no

Windows (command shell):

"C:\Program Files\Eggplant\runscript.bat" "C:\Users\Alex\Documents\appTests.suite\Scripts\test2.script" -CommandLineOutput no

Linux (bash shell):

runscript ~/Documents/appTests.suite/Scripts/test1.script -CommandLineOutput no

You can also set the CommandLineOutput global property within a script. スクリプト内で変更されたグローバルプロパティは、常に初期設定をオーバーライドします。

Note: Output set to standard error (stderr) is always displayed. コマンドラインから実行しながら出力をより微細にコントロールするには、スクリプト内でこの構文を使用します:

write "THIS IS SOME OUTPUT" to error

接続情報

用途:SUTの接続情報を以下の通り指定します:

  • -host: The hostname or IP address of a specific SUT to use for your scripts. -host引数をパスするときに、カラー階調、ポート、パスワード、およびユーザ名も指定できます。
  • -port:SUTへの接続に使用するソフトウェアのポート。 これは、VNCサーバ接続またはリモートデスクトッププロトコル(RDP)接続のいずれかのポートで、ホストWindowsマシンのユーザ名とパスワードを入力します。
  • -usernameおよび-password:SUTへのVNCサーバ接続の場合は、通常パスワードの入力のみが必要です。 In rare cases, primarily when using UltraVNC, you might need the username. リモートデスクトッププロトコル(RDP)接続の場合は、ホストWindowsマシンのユーザ名とパスワードを入力します。
  • -password64 or -pass_code64: If you use Base64 encoding for passwords or passcodes that include standard and nonstandard characters, you can use either the -password64 or -pass_code64 option. Use the -password64 option to pass Base64 encoded passwords and the -pass_code64 option to pass Base64 encoded passcodes. For more information about encoding passwords or passcodes to Base64 format, see Base64 (Encode and Decode).
  • -colorDepth:ビューアウインドウでのSUTのカラー階調:8、16、32。 (デフォルト値:SUTネイティブカラー階調。)
  • -type [RDP, VNC]:接続のタイプ。 RDPは、リモートデスクトッププロトコル(RDP)接続を指定し、Windows SUTでのみ利用可能です。 RDP接続はデフォルトでポート3389を使用します。 VNCは、VNC接続を指定します。 デフォルトの接続タイプはVNCです。 -typeオプションを省略するとVNC接続となります。
  • -DefaultHeight and -DefaultWidth:These parameters specify to display the SUT screen, and the height and width in pixels at which it displays. これらのオプションはリモートデスクトッププロトコル(RDP)接続でのみ、すなわち-typeタイプオプションがRDPに含まれ設定されている場合にのみ、使用されます。

例:

Mac (bash shell):

/Applications/Eggplant.app/Contents/MacOS/runscript /Users/Alex/Docs.suite/Scripts/myTests/test2.script -host SUT1 -port 5901 -username joeuser -password broncos -colorDepth 16

Windows (command shell):

"C:\Program Files\Eggplant\runscript.bat" "C:\Users\Alex\Documents\MySuite.suite\Scripts\test2.script" -host SUT1 -password broncos -type vnc -DefaultHeight 200 -DefaultWidth 200

Linux (bash shell):

runscript ~/Documents/appTests.suite/Scripts/test1.script -host SUT1 -port 5901 -username joeuser -password broncos -colorDepth 16

注:実行中のスクリプトまたはスケジュール内の接続情報 からのconnectコマンドは、この接続をオーバーライドします。 (この接続はオープンのままとなりますが、新しい接続がアクティブ接続になります。)

-GlobalResultsFolder

用途:スクリプト結果を保存するフォルダ名を設定ます。 フォルダパスは絶対、またはスクリプトのスイートに対して相対です。

例:

Mac (bash shell):

/Applications/Eggplant.app/Contents/MacOS/runscript /Users/Alex/Docs.suite/Scripts/test2.script -GlobalResultsFolder ~/MyResults

Windows (command shell):

"C:\Program Files\Eggplant\runscript.bat" "C:\Users\Alex\Documents\MySuite.suite\Scripts\smoketestMain.script" -GlobalResultsFolder "C:\Users\Alex\Documents\ExecutionResults\SmokeTest"

Linux (bash shell):

runscript ~/Documents/appTests.suite/Scripts/test1.script ~/Documents/appTests.suite/Scripts/test2.script -GlobalResultsFolder ~/MyResults

Note: Setting the GlobalResultsFolder is temporary and only applies to the current Eggplant Functional session. It will not affect already started scrips and their results. Also, you must set the GlobalResultsFolder before you run your script, because once a script has started to execute, its log location is fixed. When you set the GlobalResultsFolder, your results are no longer stored in the suite, so you can't view them in the Suite window.

-LicenseKey, -LicenseUser

Use: Adds a license key and user for use of Eggplant Functional.

例:

Mac (bash shell):

/Applications/Eggplant.app/Contents/MacOS/runscript -LicenseKey <license_key> -LicenseUser <user_name>

Windows (command shell):

"C:\Program Files\Eggplant\runscript.bat" -LicenseKey <license_key> -LicenseUser <user_name>

Linux (bash shell):

runscript -LicenseKey <license_key> -LicenseUser <user_name>

-LicenserHost

Use: You use the -LicenserHost argument to specify the location of the Eggplant Functional license server. You enter the -LicenserHost argument, followed by the IP address or hostname for the machine where your license server is running. Even if you specify the licenser host on the Eggplant License Registry panel, you might need to include this argument to run scripts from the command line.

例:

Mac (bash shell):

/Applications/Eggplant.app/Contents/MacOS/runscript /Users/Alex/Docs.suite/Scripts/test2.script -LicenserHost 10.1.11.105

Windows (command shell):

"C:\Program Files\Eggplant\runscript.bat" "C:\Users\Alex\Documents\MySuite.suite\Scripts\test2.script" -LicenserHost bkwinsPC

Linux (bash shell):

runscript ~/Documents/appTests.suite/Scripts/test1.script ~/Documents/appTests.suite/Scripts/test2.script -LicenserHost 10.1.11.163

Note: This argument is required in most environments for running from the command line for both Reprise License Manager (RLM) and Team License Server (TLS).

-LicenserPassword

Use: This flag is used when you've set up RLM to require a password.

例:

Mac (bash shell):

/Applications/Eggplant.app/Contents/MacOS/runscript /Users/Fred/Docs.suite/Scripts/bigtest.script -LicenserPassword password

Windows (command shell):

"C:\Program Files\Eggplant\runscript.bat" "C:\Users\Fred\Documents\MySuite.suite\Scripts\bigtest.script" -LicenserPassword password

Linux (bash shell):

runscript ~/Documents/appTests.suite/Scripts/test1.script ~/Documents/appTests.suite/Scripts/bigtest.script -LicenserPassword password

Note: This argument is only required if you've configured Reprise License Manager (RLM) to require a password.

-param (-p)

Use: The -param argument passes a parameter to a script. You can use -param before or after the name of the script. Note that the -param string must precede each parameter in the script. The -p form is an abbreviation for the same argument. これらは同じ意味で使用可能です。

Note: The -param argument (without an "s" on the end) is not the same as the older -params argument.

例:

Mac (bash shell):

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

Windows (command shell):

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

Linux (bash shell):

runscript ~/Documents/appTests.suite/Scripts/test1.script -param "SUT1" -param "phonebook.txt"

-repeat

Use: Repeats the scripts you are running the specified (x) number of times.

例:

Mac (bash shell):

/Applications/Eggplant.app/Contents/MacOS/runscript /Users/Alex/myTests.suite/Scripts/test1.script -repeat 4

Windows:

"C:\Program Files\Eggplant\runscript.bat" "C:\Users\Alex\Documents\MyTests.suite\Scripts\test1.script" -repeat 4

Linux (bash shell):

runscript ~/Documents/appTests.suite/Scripts/test1.script -repeat 4

-ReportFailures

用途:スクリプト実行後に、失敗したスクリプト・スイートの数をコマンドラインにレポートします。 Valid values: yes/no. Default value: yes. If you want Eggplant Functional to report the number of successful scripts and suites to the command line, set it to no.

例:

Mac (bash shell):

/Applications/Eggplant.app/Contents/MacOS/runscript /Users/Alex/Docs.suite/Scripts/test1.script -ReportFailures yes

Windows:

"C:\Program Files\Eggplant\runscript.bat" C:\Users\Alex\Documents\MySuite.suite\Scripts\test1.script" -ReportFailures yes

Linux (bash shell):

runscript ~/Documents/appTests.suite/Scripts/test1.script -ReportFailures yes

WebDriver Connection Information

Use: Specifies the connection information for a WebDriver connection as follows:

  • -webBrowser: Opens a WebDriver connection to a specific browser. Required.
  • -webHost: The host for the WebDriver connection. Required unless -host has been specified.
  • -webPort: Defines the port to use when creating a WebDriver connection. If no port is specified, port 4444 is used. 入力は任意です。

例:

Mac (bash shell):

/Applications/Eggplant.app/Contents/MacOS/runscript /Users/Bob/Selenium.suite/Scripts/test1.script -webBrowser "Chrome" -webHost "10.211.55.4" -webPort "4445"

Windows:

"C:\Program Files\Eggplant\runscript.bat" C:\Users\Bob\Documents\Selenium.suite\Scripts\test1.script" -webBrowser "Chrome" -webHost "10.211.55.4" -webPort "4445"

Linux (bash shell):

runscript ~/Documents/Selenium.suite/Scripts/test1.script -webBrowser "Chrome" -webHost "10.211.55.4" -webPort "4445"

 

This topic was last updated on 2月 01, 2019, at 11:13:23 午前.

Eggplant icon Eggplant.io | Documentation Home | User Forums | Support | Copyright © 2019 Eggplant