- Notifications
You must be signed in to change notification settings - Fork0
License
farwill/openbmc-test-automation
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Interface Feature List
- DMTF Redfish
- Out-of-band IPMI
- SSH to BMC and Host OS
- Legacy REST
Key Feature List
- Power on/off
- Reboot Host
- Reset BMC
- Code update BMC and host
- Power management
- Fan controller
- HTX bootme
- XCAT execution
- Network
- IPMI support (generic and DCMI compliant)
- Factory reset
- RAS (Reliability, availability and serviceability)
- Web UI testing
- Secure boot
- SNMP (Simple Network Management Protocol)
- Remote Logging via Rsyslog
- LDAP (Lightweight Directory Access Protocol)
- Certificate
- Local User Management(Redfish/IPMI)
- DateTime
- Event Logging
- PLDM (Platform Level Data Model) via pldmtool
Debugging Supported List
- SOL collection
- FFDC collection
- Error injection from host
Miscellaneous Packages required to be installed for OpenBmc Automation.Install the packages and it's dependencies via
pip
If using Python 3.x, use the correspondingpip3 to install packages. Note:Older Python 2.x is not actively supported.
REST base packages:
$ pip install -U requests $ pip install -U robotframework-requests $ pip install -U robotframework-httplibraryPython redfish library packages: For more detailed intstructions seepython-redfish-library
$ pip install redfishSSH and SCP base packages: For more detailed installation instructions seerobotframework-sshlibrary
$ pip install robotframework-sshlibrary $ pip install robotframework-scplibraryInstalling requirement dependencies:
$ pip install -r requirements.txtyou'll find this file once your clone openbmc-test-automation repository.
For Web UI ( GUI ) Testing setup instructions seeOpenBMC GUI Test Setup Guide
Installing tox:
$ pip install -U toxInstalling expect (Ubuntu example):
$ sudo apt-get install expectThese documents contain details on developing OpenBMC test code and debugging.
- MAINTAINERS: OpenBMC test code maintainers information.
- CONTRIBUTING.md: Coding guidelines.
- Code Check Tools:To check common code misspellings, syntax and standard checks.
- REST-cheatsheet.md:Quick reference for some common curl commands required for legacy RESTtesting.
- REDFISH-cheatsheet.md:Quick reference for some common curl commands required for redfish testing.
- README.md: WebUI setup reference.
- Corporate CLA and Individual CLA:Submitting changes via Gerrit server
- Tools:Reference information for helper tools.
- Code Update:Currently supported BMC and PNOR update.
- Certificate Generate:Steps to create and install CA signed certificate.
OpenBMC test infrastructure is proven capable of running on:
- POWER
- x86 systems running OpenBMC firmware stack.
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-automationExecute basic setup test run:
$ 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 whichcontain test suites, tools, templates, etc. These sub-directories are classifiedas follows:
redfish/: Contains the general test cases for OpenBMC stack functionalverification.
systest/: Contains test cases for HTX bootme testing.
xcat/: Contains test cases for XCAT automation.
gui/test/: Contains test cases for testing web-based interface built onAngularJS.
gui/gui_test/: Contains test cases for testing web-based user interface builton Vue.js.
pldm/: Contains test cases for platform management subsystem (base, bios, fru,platform, OEM).
snmp/: Contains test cases for SNMP (Simple Network Management Protocol)configuration testing.
openpower/: Contains test cases for an OpenPOWER based system.
tools/: Contains various tools.
templates/: Contains sample code examples and setup testing.
test_list/: Contains the argument files used for skipping test cases (e.g"skip_test", "skip_test_extended", etc.) or grouping them (e.g "HW_CI","CT_basic_run", etc.).
OpenBMC is moving steadily towards DTMF Redfish, which is an open industrystandard specification and schema that meets the expectations of end users forsimple, modern and secure management of scalable platform hardware.
redfish/: Contains test cases for DMTF Redfish-related feature supported onOpenBMC.
redfish/extended/: Contains test cases for combined DMTF Redfish-relatedfeature supported on OpenBMC. Some of the test will be deprecated.
Note: Work in progress test development parameter-v REDFISH_SUPPORT_TRANS_STATE:1 to force the test suites to execute inredfish mode only.
To run openbmc-automation first you need to install the prerequisite Pythonpackages which will help to invoke tests through tox (Note that tox version2.3.1 or greater is required) or via Robot CLI command.
Robot Command Line
Execute all test suites for
tests/:$ robot -v OPENBMC_HOST:xx.xx.xx.xx testsExecute a test suite:
$ robot -v OPENBMC_HOST:xx.xx.xx.xx redfish/extended/test_basic_ci.robotInitialize the following test variables which will be used during testexecution:
User can forward declare as environment variables:
$ export OPENBMC_HOST=<openbmc machine IP address/hostname>$ export OPENBMC_USERNAME=<openbmc username>$ export OPENBMC_PASSWORD=<openbmc password>$ export IPMI_COMMAND=<Dbus/External>or
User can input as robot variables as part of the CLI command:
-v OPENBMC_HOST:<openbmc machine IP address/hostname>-v OPENBMC_USERNAME:<openbmc username>-v OPENBMC_PASSWORD:<openbmc password>Testing in qemu:
Set extra environment variables:
$ export SSH_PORT=<ssh port number>$ export HTTPS_PORT=<https port number>Run the QEMU CI test suite (not all tests will pass in qemu):
$ OPENBMC_HOST=x.x.x.x SSH_PORT=<port number> HTTPS_PORT=<port number> robot -A test_lists/QEMU_CI tests/Run tests:
$ tox testsHow to run an individual test:
$ tox -e default -- --include Power_On_Test tests/test_basic_poweron.robotNo preset environment variables, default configuration for all supportedsystems:
$ OPENBMC_HOST=x.x.x.x tox -e default -- testsNo 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.robotNo preset environment variables, the entire test suite:
$ OPENBMC_HOST=x.x.x.x tox -e default -- testsNo preset environment variables, the entire test suite excluding test casesusing argument file:
$ OPENBMC_HOST=x.x.x.x tox -e default -- --argumentfile test_lists/skip_test testsExclude test list for supported systems:
Palmetto: test_lists/skip_test_palmettoWitherspoon: test_lists/skip_test_witherspoonUsing the exclude lists (example for Witherspoon)
$ robot -v OPENBMC_HOST:xx.xx.xx.xx -A test_lists/skip_test_witherspoon tests/Run IPMI tests:
Running only out-of-band IPMI tests:
$ robot -v IPMI_COMMAND:External -v OPENBMC_HOST:x.x.x.x --argumentfile test_lists/witherspoon/skip_inband_ipmi tests/ipmi/Running only inband IPMI tests:
$ robot -v IPMI_COMMAND:Inband -v OPENBMC_HOST:x.x.x.x -v OS_HOST:x.x.x.x -v OS_USERNAME:xxxx -v OS_PASSWORD:xxxx --argumentfile test_lists/witherspoon/skip_oob_ipmi tests/ipmi/Run GUI tests:
By default, GUI runs with Firefox browser and headless mode. Example withChrome browser and header mode:
$ robot -v OPENBMC_HOST:x.x.x.x -v GUI_BROWSER:gc -v GUI_MODE:header gui/test/Run GUI default CI test bucket:
$ robot -v OPENBMC_HOST:x.x.x.x --argumentfile test_lists/BMC_WEB_CI gui/test/Run LDAP tests:
Before using LDAP test functions, be sure appropriate LDAP user(s) andgroup(s) have been created on your LDAP server. Note: There are multiple waysto create LDAP users / groups and all depend on your LDAP server. One commonway for openldap is ldapadd / ldapmodify referhttps://linux.die.net/man/1/ldapadd For ldapsearch, refer to"https://linux.die.net/man/1/ldapsearch". Microsoft ADS: refer tohttps://searchwindowsserver.techtarget.com/definition/Microsoft-Active-Directory-Domain-Services-AD-DS
Note: Currently, LDAP test automation for Redfish API is in progress. Theformat to invoke LDAP test is as follows:
$ cd redfish/account_service/$ robot -v OPENBMC_HOST:x.x.x.x -v LDAP_SERVER_URI:<ldap(s)//LDAP Hostname / IP> -v LDAP_BIND_DN:<LDAP Bind DN> -v LDAP_BASE_DN:<LDAP Base DN> -v LDAP_BIND_DN_PASSWORD:<LDAP Bind password> -v LDAP_SEARCH_SCOPE:<LDAP search scope> -v LDAP_SERVER_TYPE:<LDAP server type> -v LDAP_USER:<LDAP user-id> -v LDAP_USER_PASSWORD:<LDAP PASSWORD> -v GROUP_NAME:<Group Name> -v GROUP_PRIVILEGE:<Privilege> ./test_ldap_configuration.robotHow 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 testsDefault CI smoke test bucket list:
$ OPENBMC_HOST=x.x.x.x tox -e default -- --argumentfile test_lists/CT_basic_run testsRun 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.robotExample using tox testing a test suite for 5 iterations "witherspoon":
OPENBMC_HOST=x.x.x.x LOOP_TEST_COMMAND="tests/test_fw_version.robot" ITERATION=5 OPENBMC_SYSTEMMODEL=witherspoon tox -e witherspoon -- ./extended/full_suite_regression.robotHost CPU architecture
By default openbmc-test-automation framework assumes that host CPU is based onthe POWER architecture. If your host CPU is x86 add
-v PLATFORM_ARCH_TYPE:x86variable setting to your CLI commands or set anenvironment variable:$ export PLATFORM_ARCH_TYPE=x86
Jenkins jobs tox commands
HW CI tox command:
$ OPENBMC_HOST=x.x.x.x tox -e default -- --argumentfile test_lists/HW_CI tests
About
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Languages
- RobotFramework66.4%
- Python29.0%
- Tcl3.1%
- Shell1.5%