commit | 79e276c8fa7d77d7b55068e27cf50160b33ecf02 | [log] [tgz] |
---|---|---|
author | Rahul Maheshwari <rahulmaheshwari@in.ibm.com> | Mon Jun 11 01:23:15 2018 -0500 |
committer | Rahul Maheshwari <rahulmaheshwari@in.ibm.com> | Thu Jun 21 07:29:40 2018 -0500 |
tree | aa787d082dc7fe8274ccbde0eca1911efaf04656 | |
parent | 2d6cb1924e6aa8ac70df63209de0d13d94b87087 [diff] |
Setting GUI testing to be executed using headless way. Resolves openbmc/openbmc-test-automation#1402 Change-Id: I292bfc9a7bfe5e52b1c8baeb75e0a2dbe576db3e Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
Interface Feature List
Key Feature List
Debugging Supported List
Miscellaneous Packages required to be installed for OpenBmc Automation. Install the packages and it's dependencies via pip
REST base packages:
$ pip install -U requests $ pip install -U robotframework-requests
SSH and SCP base packages: For more detailed installation instructions see robotframework-sshlibrary
$ pip install robotframework-sshlibrary $ pip install robotframework-scplibrary
These documents contain details on developing OpenBMC test code and debugging.
To verify the installation setup is completed and ready to execute.
$ git clone https://github.com/openbmc/openbmc-test-automation $ cd openbmc-test-automation
$ robot -v OPENBMC_HOST:xx.xx.xx.xx templates/test_openbmc_setup.robotwhere xx.xx.xx.xx is the BMC hostname or IP.
There are several sub-directories within the openbmc-test-automation base which contain test suites, tools, templates, etc. These sub-directories are classified as follows:
tests/
: Contains the general test cases for OpenBMC stack functional verification.
extended/
: Contains test cases for boot testing, network testing, code update testing etc.
systest/
: Contains test cases for HTX bootme, IO storage and EEH testing.
xcat/
: Contains test cases for XCAT automation.
ras/
: Contains test cases for RAS (Reliability, availability and serviceability).
gui/
: Contains test cases for web UI and security scanning tool automation.
mnfg/
: Contains test cases for factory reset (DHCP mode) and PGOOD testing.
network/
: Contains test cases for network testing.
secureboot/
: Contains test cases for secure boot testing on a secure boot feature enabled system only.
tools/
: Contains various tools.
templates/
: Contains sample code examples and setup testing. `
To run openbmc-automation first you need to install the prerequisite Python packages which will help to invoke tests through tox (Note that tox version 2.3.1 or greater is required) or via Robot CLI command.
Robot Command Line
tests/
:$ robot -v OPENBMC_HOST:xx.xx.xx.xx tests
$ robot -v OPENBMC_HOST:xx.xx.xx.xx tests/test_basic_poweron.robot
Tox Command Line
Install the python dependencies for tox:
$ easy_install tox $ easy_install pip
Initialize the following environment variables which will be used during testing:
$ export OPENBMC_HOST=<openbmc machine ip address> $ export OPENBMC_PASSWORD=<openbmc password> $ export OPENBMC_USERNAME=<openbmc username> $ export OPENBMC_MODEL=[./data/Barreleye.py, ./data/Palmetto.py, etc] $ export IPMI_COMMAND=<Dbus/External> $ export IPMI_PASSWORD=<External IPMI password>
For tests requiring PDU, set the following environment variables as well:
$ export PDU_IP=<PDU IP address> $ export PDU_USERNAME=<PDU username> $ export PDU_PASSWORD=<PDU password> $ export PDU_TYPE=<PDU type> $ export PDU_SLOT_NO=<SLOT number>
Note: For PDU_TYPE we support only synaccess at the moment.
For QEMU tests, set the following environment variables as well:
$ export SSH_PORT=<ssh port number> $ export HTTPS_PORT=<https port number>
For BIOS tests, set the following environment variables as well:
$ export PNOR_IMAGE_PATH=<path to>/<machine>.pnor
Run tests:
$ tox -e tests
How to run individual test:
One specific test:
$ tox -e default -- --include Power_On_Test tests/test_basic_poweron.robot
No preset environment variables, default configuration for all supported systems:
$ OPENBMC_HOST=x.x.x.x tox -e default -- tests
No preset environment variables, one test case from a test suite:
$ OPENBMC_HOST=x.x.x.x tox -e default -- --include Power_On_Test tests/test_basic_poweron.robot
No preset environment variables, the entire test suite:
$ OPENBMC_HOST=x.x.x.x tox -e default -- tests
No preset environment variables, the entire test suite excluding test cases using argument file:
$ OPENBMC_HOST=x.x.x.x tox -e default -- --argumentfile test_lists/skip_test tests
Exclude test list for supported systems:
Barrleye: test_lists/skip_test_barreleye Palmetto: test_lists/skip_test_palmetto Witherspoon: test_lists/skip_test_witherspoon
How to run CI and CT bucket test:
Default CI test bucket list:
$ OPENBMC_HOST=x.x.x.x tox -e default -- --argumentfile test_lists/HW_CI tests
Default CI smoke test bucket list:
$ OPENBMC_HOST=x.x.x.x tox -e default -- --argumentfile test_lists/CT_basic_run tests
Code update test:
For BMC code update, download the system type *.ubi.mdt.tar image from https://openpower.xyz/job/openbmc-build/ and run as follows:
For Witherspoon system:
$ cd extended/code_update/ $ robot -v OPENBMC_HOST:x.x.x.x -v IMAGE_FILE_PATH:<image path>/obmc-phosphor-image-witherspoon.ubi.mtd.tar --include REST_BMC_Code_Update bmc_code_update.robot
For host code update, download the system type *.pnor.squashfs.tar image from https://openpower.xyz/job/openpower-op-build/ and run as follows:
For Witherspoon system:
$ cd extended/code_update/ $ robot -v OPENBMC_HOST:x.x.x.x -v IMAGE_FILE_PATH:<image path>/witherspoon.pnor.squashfs.tar --include REST_Host_Code_Update host_code_update.robot
For manual code update information please refer to code-update.md
Run extended tests:
For loop test (default iteration is 10):
$ robot -v OPENBMC_HOST:x.x.x.x -v OPENBMC_SYSTEMMODEL:xxxxxx -v ITERATION:n -v LOOP_TEST_COMMAND:xxxxxx extended/full_suite_regression.robot
Example using tox testing a test suite for 5 times:
OPENBMC_HOST=x.x.x.x LOOP_TEST_COMMAND="--argumentfile test_lists/skip_test tests/test_fw_version.robot" ITERATION=5 OPENBMC_SYSTEMMODEL=barreleye tox -e barreleye -- ./extended/full_suite_regression.robot
Jenkins jobs tox commands
$ OPENBMC_HOST=x.x.x.x tox -e default -- --argumentfile test_lists/HW_CI tests