README: Add testing setup and sample code documentation.
Change-Id: I5d893d5af12333843f6851e32fb99f4ed62f43f0
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/README.md b/README.md
index 249f3da..9006f87 100755
--- a/README.md
+++ b/README.md
@@ -38,6 +38,20 @@
$ pip install robotframework-sshlibrary
$ pip install robotframework-scplibrary
```
+## Testing Setup Steps ##
+
+To verify the installation setup is completed and ready to execute.
+
+* Download the openbmc-test-automation repository:
+ ```
+ $ git clone https://github.com/openbmc/openbmc-test-automation
+ $ cd openbmc-test-automation
+ ```
+* Execute basic setup test run:
+ ```
+ $ robot -v OPENBMC_HOST:xx.xx.xx.xx templates/test_openbmc_setup.robot
+ ```
+ where xx.xx.xx.xx is the BMC hostname or IP.
## Quickstart ##
To run openbmc-automation first you need to install the prerequisite python
diff --git a/templates/test_openbmc_setup.robot b/templates/test_openbmc_setup.robot
new file mode 100644
index 0000000..527d702
--- /dev/null
+++ b/templates/test_openbmc_setup.robot
@@ -0,0 +1,35 @@
+*** Settings ***
+Documentation Test suite to verify if the Robot setup is ready for use.
+
+Resource ../lib/resource.txt
+Resource ../lib/rest_client.robot
+Resource ../lib/connection_client.robot
+Resource ../lib/ipmi_client.robot
+
+*** Test Cases ***
+
+Test OpenBMC Automation Setup
+ [Documentation] Verify REST, SSH, Out-of-band IPMI and others.
+
+ Log To Console \n *** Testing REST Setup ***
+
+ # REST Connection and request.
+ Initialize OpenBMC
+ # Raw GET REST operation to verify session is established.
+ ${resp}= Get Request openbmc /xyz/openbmc_project/
+ Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
+ ${content}= To JSON ${resp.content} pretty_print=True
+ Log To Console \n ${content}
+
+ Log To Console \n *** Testing SSH Setup ***
+
+ # SSH Connection and request.
+ Open Connection And Log In
+ ${bmc_kernel}= Execute Command uname -a
+ Log To Console \n ${bmc_kernel}
+
+ Log To Console \n *** Testing Out-of-band IPMI tool Setup ***
+
+ # IPMI Connection and request.
+ ${chassis_status}= Run IPMI Standard Command chassis status
+ Log To Console \n ${chassis_status}