Resources.FitNesseRoot.PlugIns.SshFixture.UserGuide.Options.DefineOptions.ScenarioTable.wiki Maven / Gradle / Ivy
---
Test
---
!1 !-SshFixture-! option definition in scenario table
In this page is described how to define options in !-SshFixture-! scenario tables. These definitions can be easily reused in ScriptTable mode.
!2 Define options in table body for scenario table
In scenario table body, options can be set like in table header mode via the method: options.
|scenario|load options |
|options |MY_OPTION_1 MY_OPTION_2=my-value MY_OPTION_3="my value"|
|script |ssh client|foo/[email protected]|
|load options |
|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|
|scenario|load options |
|options |MY_OPTION_1 MY_OPTION_2=my-value MY_OPTION_3="my value"|
|script |ssh client|foo/[email protected]|
|load options |
|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|
|scenario |load options |
|add option|MY_OPTION_1 |
|add option|MY_OPTION_2|with value|my-Value|
|add option|MY_OPTION_3|with value|my Value|
|script |ssh client|foo/[email protected]|
|load options |
|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][