3.1. Execute Command
Goal
- Create a new test suite named
03-Remote
, which has a suite named01-connection
. - Create a new keyword named
Open Connection And Log In With Password
which establish connection to the remote host. - Create a new test case named
Get Date From Remote Host
which will executedate
command on the remote host and log the output to the console.
Solution
Hints
You can use SSHLibrary
to open connection to a remote host using SSH
.
Click here to learn more about SSHLibrary
and its keywords..
Solution: tests/03-remote/01-connection.robot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
|
Results
Inside the tests
folder, execute the following command to execute 03-Remote
suite.
1 |
|
The output should be something like this:
==============================================================================
Tests.03-Remote
==============================================================================
Tests.03-Remote.01-Connection
==============================================================================
Get Date From Remote Host ..Sun Jun 14 21:13:28 CEST 2020
Get Date From Remote Host | PASS |
You can check the generated log.html
file to see how your test cases worked.
Last update: June 22, 2020