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

  1. 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):
  2. $ git clone --branch apertis/v2023dev0 https://gitlab.apertis.org/tests/robotframework.git
  3. Copy the test directory robotframework to the target device:
  4. $ DUT_IP=<device-ip>
    $ scp -r robotframework user@$DUT_IP:
  5. Log into the target device:
  6. $ ssh user@$DUT_IP
  7. Robotframework package needs to installed in SDK.
  8. $ sudo apt-get install python3-robotframework
    $ sudo apt-get install python3-robotframework-sshlibrary
  9. git clone the robotframework folder from the apertis repo.

Execution Steps

    $ cd robotframework
  1. Enter the IP address of target
  2. $ 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