Connecting to a Device and Capturing Commands
To connect to a configured device:
Configure the device session settings as described in Configuring Session Parameters.Alternatively you can you can load a previously configured session by clicking the Load from Storage...
button. This opens a standard selection window ( Figure:Load Session window), which enables you to choose an existing session from those stored in the Resources/Device Sessions folder.
Click the Connectbutton. A connection to the configured device is established, enabling you to input commands in the Session Consoles window that appears (Figure:Command Line Interface in Session Console). A StartSession command is automatically captured as a script step and is added to the end of the Script Steps table.
Figure:Command Line Interface in Session Console
The Connect
button is not available when the device session uses variables as parameters. In such a case, when attempting to connect to a device, you are prompted to select the steps that initialize the variables and first replay these steps.
If at any moment you wish to issue a command that is not supposed to be captured, switch capturing off (
) and continue interacting with the device. Eventually switch capturing on again when you wish to add more script steps while interacting with the test device.
Depending on the active session type, the console supports the history and autocompletion functionality that is made available when pressing special keys on the keyboard, such as Backspace, Home/End, or arrow keys. For information on configuring the actual character sequences that are transmitted to devices for the special keys, refer to Defining Terminal Settings.
For all session types, pressing the Enter keys on a connected session adds an empty test step. When the step is executed, an Enter character is sent to the configured device.
In the case of the CmdTool and Tclsh sessions, you can change the cursor position using both the keyboard input and mouse interaction. For Telnet and SSH sessions, you can can move inside the command text only using the keyboard, while the mouse can only be used for local operations such as copy and paste.When the step is added, a response template called Local Step Response is associated with the step. It can be edited such as to define specific portions of the command response as targets, as described in Creating Response Templates.
Upon connecting to a device, a device logon sequence might unfold requiring the input of user name and a password in response to device prompts. If such a case the device-generated prompts are captured into the DevicePrompts tab of the Session Consoles window, and any user input is recorded as script steps.
Eventually click the Disconnect
button to terminate the session. Upon closing the session, a StopSession command is automatically captured as a last script step if the capturing functionality is switched on.
While connected to a configured test device, it is recommended to avoid executing
exit
commands to the device. The preferred solution is to disconnect using a StopSession step, which can be automatically generated by clicking the Disconnectbutton.
However, if you still need to use anexit
command, be aware that when running the step, it will be marked as having had an error because the session was disconnected by the device and not by the TestComposer plug-in.See Also
IxLoad TestComposer │ User Guide |