robotframework manual
critical
- Image Types:
- basesdk-amd64 / fixedfunction-armhf / fixedfunction-arm64 / fixedfunction-amd64 / hmi-armhf / hmi-amd64 / sdk-amd64
- Image Deployment:
- APT, OSTree
- Type:
- functional
Description
This test checks that the Robot Framework can be run in SDK, that the framework can connect to a target via SSH, upload files, run commands and retrieve command output.
Pre Conditions
- Clone the tests repository from another computer (Note that the branch being tested may change depending on the release, please make sure to clone the correct branch for the release in question):
- Copy the test directory robotframework to the target device:
- Log into the target device:
- Robotframework package needs to installed in SDK.
- git clone the robotframework folder from the apertis repo.
$ git clone --branch apertis/v2023dev0 https://gitlab.apertis.org/tests/robotframework.git
$ DUT_IP=<device-ip>
$ scp -r robotframework user@$DUT_IP:
$ ssh user@$DUT_IP
$ sudo apt-get install python3-robotframework
$ sudo apt-get install python3-robotframework-sshlibrary
Execution Steps
- Enter the IP address of target
$ cd robotframework
$ robot --variable target:<ip address of target> robotframework.robot
Expected
Should be able to connect the target, transfer files to target and execute commands on target from SDK using Robot Framework.
When running the script, an example.txt file will be created in the current directory which will be transferred to the target /home/user path.
The file should exist in the /home/user, be readable and match the content sent to the target.
The command should report no failure and its output should be something like this at the end:
============================================================================== Robotframework :: Robot Framework test script ============================================================================== testcase ....Hello World! testcase | PASS | ------------------------------------------------------------------------------ Robotframework :: Robot Framework test script | PASS | 1 test, 1 passed, 0 failed ============================================================================== Output: /home/user/output.xml Log: /home/user/log.html Report: /home/user/report.html