Resources.FitNesseRoot.PlugIns.SshFixture.UserGuide.Options.DefineOptions.ScriptTable.wiki Maven / Gradle / Ivy
---
Test
---
!1 !-SshFixture-! option definition in script table
In this page is described how to define options in !-SshFixture-! script tables.
Note: the dump-options command called in the following tests is available only for the mocked host: ssh-fitnesse.dev.
|import |
|com.github.gun88.fitnesse.fixture.ssh|
!2 Define options in table header for script table
Rules for options definition in table header are the same for DecisionTable mode. The following test is the last example in DecisionTable page adapted for script table. All rules and constraints for decision table and table header options definitions are valid also for script table header options definitions.
|script |ssh client|foo/[email protected]|MY_OPTION_1 MY_OPTION_2=my-value MY_OPTION_3="my value"|
|open connection |
|execute|dump-options MY_OPTION_1 |
|check |output |MY_OPTION_1 |
|execute|dump-options MY_OPTION_2 |
|check |output |MY_OPTION_2=my-value |
|execute|dump-options MY_OPTION_3 |
|check |output |MY_OPTION_3=my value |
|close connection |
!***> code
{{{!-
|import |
|com.github.gun88.fitnesse.fixture.ssh|
|script |ssh client|foo/[email protected]|MY_OPTION_1 MY_OPTION_2=my-value MY_OPTION_3="my value"|
|open connection |
|execute|dump-options MY_OPTION_1 |
|check |output |MY_OPTION_1 |
|execute|dump-options MY_OPTION_2 |
|check |output |MY_OPTION_2=my-value |
|execute|dump-options MY_OPTION_3 |
|check |output |MY_OPTION_3=my value |
|close connection |
!define TEST_SYSTEM {slim}
!path ${jsch.jar.path}
!path ${sshFixture.jar.path}
-!}}}
Note: if !-SshFixture-! is not installed as a plugin, remember to set or replace properties: jsch.jar.path, sshFixture.jar.path; with actual paths.
Note: In this example the connection was built via username and password, that are set in plain text in table header. Click [[here][ code
{{{!-
|import |
|com.github.gun88.fitnesse.fixture.ssh|
|script |ssh client|foo/[email protected] |
|options|MY_OPTION_1 MY_OPTION_2=my-value MY_OPTION_3="my value"|
|open connection |
|execute|dump-options MY_OPTION_1 |
|check |output |MY_OPTION_1 |
|execute|dump-options MY_OPTION_2 |
|check |output |MY_OPTION_2=my-value |
|execute|dump-options MY_OPTION_3 |
|check |output |MY_OPTION_3=my value |
|close connection |
!define TEST_SYSTEM {slim}
!path ${jsch.jar.path}
!path ${sshFixture.jar.path}
-!}}}
Note: if !-SshFixture-! is not installed as a plugin, remember to set or replace properties: jsch.jar.path, sshFixture.jar.path; with actual paths.
Note: In this example the connection was built via username and password, that are set in plain text in table header. Click [[here][ code
{{{!-
|import |
|com.github.gun88.fitnesse.fixture.ssh|
|script |ssh client |foo/[email protected]|
|add option|MY_OPTION_1 |
|add option|MY_OPTION_2|with value|my-value |
|add option|MY_OPTION_3|with value|my value |
|open connection |
|execute |dump-options MY_OPTION_1 |
|check |output |MY_OPTION_1 |
|execute |dump-options MY_OPTION_2 |
|check |output |MY_OPTION_2=my-value |
|execute |dump-options MY_OPTION_3 |
|check |output |MY_OPTION_3=my value |
|close connection |
!define TEST_SYSTEM {slim}
!path ${jsch.jar.path}
!path ${sshFixture.jar.path}
-!}}}
Note: if !-SshFixture-! is not installed as a plugin, remember to set or replace properties: jsch.jar.path, sshFixture.jar.path; with actual paths.
Note: In this example the connection was built via username and password, that are set in plain text in table header. Click [[here][ code
{{{!-
|import |
|com.github.gun88.fitnesse.fixture.ssh|
|script |ssh client |foo/[email protected]|
|add option |MY_OPTION_1|with value|my-value-1 |
|add option |MY_OPTION_2|with value|my-value-2 |
|open connection |
|reset option|MY_OPTION_1 |
|execute |dump-options MY_OPTION_1 |
|check |output | |
|execute |dump-options MY_OPTION_2 |
|check |output |MY_OPTION_2=my-value-2 |
|close connection |
!define TEST_SYSTEM {slim}
!path ${jsch.jar.path}
!path ${sshFixture.jar.path}
-!}}}
Note: if !-SshFixture-! is not installed as a plugin, remember to set or replace properties: jsch.jar.path, sshFixture.jar.path; with actual paths.
Note: In this example the connection was built via username and password, that are set in plain text in table header. Click [[here][ code
{{{!-
|import |
|com.github.gun88.fitnesse.fixture.ssh|
|script |ssh client |foo/[email protected]|
|add option|MY_OPTION_1|with value|my-value-1 |
|add option|MY_OPTION_2|with value|my-value-2 |
|open connection |
|reset options |
|execute |dump-options MY_OPTION_1 MY_OPTION_2|
|check |output | |
|close connection |
!define TEST_SYSTEM {slim}
!path ${jsch.jar.path}
!path ${sshFixture.jar.path}
-!}}}
Note: if !-SshFixture-! is not installed as a plugin, remember to set or replace properties: jsch.jar.path, sshFixture.jar.path; with actual paths.
Note: In this example the connection was built via username and password, that are set in plain text in table header. Click [[here][