RobotFramework
Introduction

RF Goal

Test cases in text


→ Implement Keywords


→ Report

RF Goal (cont.)

Test Case Title Description Expected Result
Virtual Switch - setup VSW for single SUT (HyperV) [Precondition]
1. 1 SUT is prepared for VSW testing
2. No VSW exists
[Steps]
1. Go to VTC web console and log on as Administrator
2. Go to VTC > Scenarios
3. Click Add scenario button
4. Add scenario:
- Scenario Name: "VSW_Tetting"
- Add host: Add 1 host as prepared in precondition with correct IP, Username, Password, Hypervisor (HpyerV), and valid number of NIC (<= existing NIC number on the hosts)
- Add guests:
Number: 2
Perfect VM: provide valid perfect VM location
OS type: Windows
Username: valid username
Password: valid password
- Add Tools:
Tool name: BigVM
Settings: 10 32 80 16
Execution time (minutes): 2
5. Click Add button
6. Run the scenario
7. Go to VTC > Jobs
8. Verify the job execution result on VTC > Jobs > VSW_Testing
9. Remote to the host and verify the VSWs setup is successful
1. Job logs of the Jobs page of "VSW_Testing" should show VSW setting is successful
2. There should be no error on the Jobs page
3. The host should show the VSWs are set successfully

RF Goal (cont.)

RF Goal (cont.)

Run

Test Data

    RAT (deploy → FTS → fail-fast) → FAST

Run Command

$ pybot -A argfile -V apua_test_env.yaml test_data

HTML Report

HTML Report

Demo (fail fast)

Test Cases Area

Execution Order and Stop

Execution order

    * order as defined in file

    * order by prefix of file/dir names

    * order of given multiple files/dirs

Randomizing execution order

    * argument `--randomize`
Stop

    * set critical tags `--critical`

    * stop when critical cases fail `--exitonfailure`

Choosing Execution

$ pybot -A argfile -V apua_test_env.yaml
> -i RAT -e deploy
> test_data_1 test_data_2 test_data_3

Choosing Execution

$ pybot -A argfile -V apua_test_env.yaml
> -t "first time setup"
> test_data_1 test_data_2 test_data_3

Setup and Teardown

* in test case

* in every test cases

* in file as test suite

* in dir as test suite

Tools

  • library generation: libdoc, testdoc
  • merge report: rebot
  • clean / transform format: tidy
  • editor: ride
  • library: RoboGalaxy, Selenium2Lib, WinRMLibrary, ...
  • other: pabot (parallel)

Discussion

  • automation (Jenkins) and manual usage
  • test cases (moreover, reports) content
  • classification test data by features, types (RAT, FAST, TOFT, ...) or something else
  • version control consideration
  • naming and file format (eg: YAML)

Automation Test Infrastructure Issues

  • build with devops (eg: Puppet, Ansible)
  • build more nested hypervisors manually

RobotFramework Instroduction

By Apua A.Aa

RobotFramework Instroduction

  • 1,594