Giter Site home page Giter Site logo

openbmc-test-automation's Introduction

Features of OpenBMC Test Automation

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

Installation Setup Guide

If using Python 3.x, use the corresponding pip3 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-httplibrary

Python redfish library packages: For more detailed intstructions see python-redfish-library

    $ pip install redfish

SSH and SCP base packages: For more detailed installation instructions see robotframework-sshlibrary

    $ pip install robotframework-sshlibrary
    $ pip install robotframework-scplibrary

Installing requirement dependencies:

    $ pip install -r requirements.txt

you'll find this file once your clone openbmc-test-automation repository.

For Web UI ( GUI ) Testing setup instructions see OpenBMC GUI Test Setup Guide

Installing tox:

    $ pip install -U tox

Installing expect (Ubuntu example):

    $ sudo apt-get install expect

OpenBMC Test Development

These documents contain details on developing OpenBMC test code and debugging.

OpenBMC Test Documentation

Supported Systems Architecture

OpenBMC test infrastructure is proven capable of running on:

  • POWER
  • x86 systems running OpenBMC firmware stack.

Testing Setup Steps

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-automation
    
  • Execute basic setup test run:

    $ robot -v OPENBMC_HOST:xx.xx.xx.xx templates/test_openbmc_setup.robot
    

    where xx.xx.xx.xx is the BMC hostname or IP.

Test Layout

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:

redfish/: Contains the general test cases for OpenBMC stack functional verification.

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 on AngularJS.

gui/gui_test/: Contains test cases for testing web-based user interface built on 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.).

Redfish Test Layout

OpenBMC is moving steadily towards DTMF Redfish, which is an open industry standard specification and schema that meets the expectations of end users for simple, modern and secure management of scalable platform hardware.

redfish/: Contains test cases for DMTF Redfish-related feature supported on OpenBMC.

redfish/extended/: Contains test cases for combined DMTF Redfish-related feature 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 in redfish mode only.

Quickstart

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

  • Execute all test suites for tests/:

    $ robot -v OPENBMC_HOST:xx.xx.xx.xx  tests
    
  • Execute a test suite:

    $ robot -v OPENBMC_HOST:xx.xx.xx.xx redfish/extended/test_basic_ci.robot
    
  • Initialize the following test variables which will be used during test execution:

    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 tests
    
  • How to run an individual 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:

    Palmetto:  test_lists/skip_test_palmetto
    Witherspoon:  test_lists/skip_test_witherspoon
    

    Using 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 with Chrome 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) and group(s) have been created on your LDAP server. Note: There are multiple ways to create LDAP users / groups and all depend on your LDAP server. One common way for openldap is ldapadd / ldapmodify refer https://linux.die.net/man/1/ldapadd For ldapsearch, refer to "https://linux.die.net/man/1/ldapsearch". Microsoft ADS: refer to https://searchwindowsserver.techtarget.com/definition/Microsoft-Active-Directory-Domain-Services-AD-DS

    Note: Currently, LDAP test automation for Redfish API is in progress. The format 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.robot
    
  • 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
    
  • 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 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.robot
    
  • Host CPU architecture

    By default openbmc-test-automation framework assumes that host CPU is based on the POWER architecture. If your host CPU is x86 add -v PLATFORM_ARCH_TYPE:x86 variable setting to your CLI commands or set an environment 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
    

openbmc-test-automation's People

Contributors

adathatri avatar anvesh001 avatar ashwinic777 avatar dnirmala avatar ganesan149 avatar garzam avatar gkeishin avatar gtmills avatar manashsarma avatar meghagn12345 avatar meghagn5 avatar michaelshepos avatar micwalsh avatar nagarjunb22 avatar nandishmatti avatar onye1 avatar peterp-ibm avatar prkatti1 avatar rahulmah avatar rramyasr avatar shrsuman123 avatar sivassrr avatar srideviramesh avatar ssombar avatar sushmm99 avatar susilsi7 avatar swe12345 avatar timlee66 avatar tonylee79 avatar vikantan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openbmc-test-automation's Issues

PreTag 0.8 Testing failure for 'Set the power with greater then MAX_POWER_VALUE'

@causten commented on Thu May 19 2016

Full Name: Tests.Test Generic Conf.Set the power with greater then MAX_POWER_VALUE
Documentation:

BAD PATH This test case sets the power value which is greater then MAX_ALLOWED_VALUE,Expectation is to return error
Start / End / Elapsed: 20160519 15:17:46.619 / 20160519 15:17:50.565 / 00:00:03.946
Status: FAIL (critical)
Message: 1010 == 1010


@rahulmah commented on Tue Jun 14 2016

@ratagupt : It seem like we are able to set power with value greater then 1000(like 1010 of your test case). Please let us know if a test case problem or it is fw issue.

PreTag 0.8 Testing failure for 'Set the boot flags with string'

@causten commented on Thu May 19 2016

Full Name: Tests.Test Generic Conf.Set the boot flags with string
Documentation:

BAD PATH This test case sets the boot flag with some invalid string Expectation is it should not be set.
Start / End / Elapsed: 20160519 15:17:57.046 / 20160519 15:18:00.763 / 00:00:03.717
Status: FAIL (critical)
Message: 3ab56f == 3ab56f


@rahulmah commented on Tue Jun 14 2016

@ratagupt : I think this test case was never passing. Please let me know if it has ever worked.

PreTag Set IP address on valid Interface - FAILED

Set IP address on valid Interface Failure.. This needs to be fix asap.. because of these 2 more test cases are failing .... ( "Persistency check for ip address" / Revert the last ip address change )

Full Name: Tests.Test Networkd.Set IP address on valid Interface
Documentation: This test case sets the ip on the interface and validates that ip address has been set or not. Expectation is the ip address should get added.
Tags: network_test
Start / End / Elapsed: 20160530 23:16:18.693 / 20160530 23:16:18.705 / 00:00:00.012
Status: FAIL (critical)
Message: Environment variable 'NEW_BMC_IP' does not exist.

As per README.md ..
Use Following Variables for networking test cases

$export NEW_BMC_IP=
$export NEW_SUBNET_MASK=
$export NEW_GATEWAY=

But I don't see it exported any where in the setup.. So either this has to be automated or to be removed from the test case in full run... since it needs the setup prior to running the test,..

So this code tests/test_networkd.robot: ${NEW_IP}= Get Environment Variable NEW_BMC_IP

is bound to fail...

+++++++++++++++++++++++++

Since the above test case ""Set IP address on valid Interface" Failed.. this also failed...

And same with test case "Persistency check for ip address"

Revert the last ip address change

Full Name: Tests.Test Networkd.Revert the last ip address change
Documentation:

This test case sets the ip on the interface and validates that ip address has been set or not. Expectation is the ip address should get added.
Tags: network_test
Start / End / Elapsed: 20160530 23:16:18.706 / 20160530 23:16:18.717 / 00:00:00.011
Status: FAIL (critical)
Message: Variable '${OLD_IP}' not found.

Feature: To collect FFDC for OpenBMC systems

Basically for each test case failure, Would like to collect relevant data like
Journalctl
PS
BMC version
OS Version - if it is related
TOP output - if it is performance issue
Hostboot state - output of obmcutil state, obmcutil bootprogress etc..

PreTag: [System - barreleye Build - 20160610155319 ] Set PowerCap

@gkeishin commented on Mon Jun 13 2016

One of the test case is looking for SetValue object... This object is not found as per the log ..

Can someone look into it and let us know.. why this is not available.. Thanks

For Reference log:

Start / End / Elapsed: 20160613 12:31:25.747 / 20160613 12:31:25.747 / 00:00:00.000
12:31:25.747 INFO ${msg} = URI:https://9.3.23.30/org/openbmc/sensors/host/PowerCap/action/setValue, method:Post, args:{u'data': {u'data': [0]}, u'headers': {u'Content-Type': u'application/json'}}
00:00:00.001 KEYWORD rest_client . Logging ${msg}, console=TRUE

12:31:26.869 INFO ${resp} = <Response [404]>
12:31:26.870 INFO ${resp} = <Response [404]>

Documentation:

Fails if objects are unequal after converting them to strings.
Start / End / Elapsed: 20160613 12:31:26.870 / 20160613 12:31:26.872 / 00:00:00.002
12:31:26.871 INFO Argument types are:
<type 'int'>
<type 'unicode'>
12:31:26.872 FAIL 404 != 200

Tag:20160613175742: OLD_GATEWAY not set - Persistance check for IP address TC fails

Ran with Level 20160613175742 build on Barreleye and found Persistance check for IP address TC fails for the following reason.
Documentation:

Sets variable based on the given condition.
Start / End / Elapsed: 20160614 02:15:31.894 / 20160614 02:15:31.896 / 00:00:00.002
02:15:31.896 FAIL Variable '${OLD_GATEWAY}' not found. Did you mean:
${gateway}

PreTag: [System - Palmetto Build - 20160622153832 ] 'Is Power On' failed after retrying for 3 minutes.

Tests are failing (in boot policy) as system is not powering in specified time of 3 mins.

Start / End / Elapsed: 20160615 12:44:00.078 / 20160615 12:44:00.078 / 00:00:00.000
12:44:00.078 FAIL FW Progress, Baseboard Init != FW Progress, Starting OS
12:44:00.079 FAIL Keyword 'Is Power On' failed after retrying for 3 minutes. The last error was: FW Progress, Baseboard Init != FW Progress, Starting OS

PreTag 0.8 Testing failure for 'Blink Slow the Identify LED'

@causten commented on Thu May 19 2016

Blink Slow the Identify LED
Full Name: Tests.Test Led.Blink Slow the Identify LED
Documentation:

This testcase is to test the setBlinkSlow functionality of the Identify LED. The LED state is sampled to figure out whether the LED is blinking. There is no distinguishing between whether the LED is blinking fast or slow for this testcase to pass.
Start / End / Elapsed: 20160519 15:21:21.448 / 20160519 15:21:42.413 / 00:00:20.965
Status: FAIL (critical)
Message: '0 > 0 and 5 > 0' should be true.


@vishwabmc commented on Tue May 24 2016

Alright... I feel its not a bug wrt the LED blinking.. It should be about how we are sampling it. Doing it via network REST way definitely adds onto time. I would visually verify if the LED is blinking slow and if there are issues we can look into it. The duty cycle ratio was agreed with Norm after he visually inspected the LEDs..

Or are you saying its just about the Automated Testability request ?


@causten commented on Tue May 24 2016

Can the user use rest to discover if the led is set to what they asked it to be set to? The test case indicates they can not. So how does the user determine if the Led is blinking via rest ?

Sent from my iPhone using IBM Verse

On May 24, 2016, 1:31:30 AM, [email protected] wrote:

From: [email protected]
To: [email protected]
Cc: [email protected], [email protected]
Date: May 24, 2016 1:31:30 AM
Subject: Re: [openbmc/openbmc] PreTag 0.8 Testing failure for 'Blink Slow the Identify LED' (#285)

Alright... I feel its not a bug wrt the LED blinking.. It should be about how we are sampling it. Doing it via network REST way definitely adds onto time. I would visually verify if the LED is blinking slow and if there are issues we can look into it. The duty cycle ratio was agreed with Norm after he visually inspected the LEDs..
Or are you saying its just about the Automated Testability request ?
โ€”You are receiving this because you authored the thread.Reply to this email directly or view it on GitHub


@vishwabmc commented on Tue May 24 2016

So the user can use REST to see if its blinking looking at the pattern.. REST way can not today tell if its binking fast or slow since there would always be these network odds.. So back then, the requirement was to see if its blinking.. If we need at the granularity of duty cycle, we need to put some change into code and return what is the state by looking at our own settings since those settings are what is directing the LEDs.

We can take this change .. but would be a change to suffice testability aspects only.

Detecting the system automatically and kick off tests related to that model of the system only

Based on the https://github.com/mkumatag/openbmc-automation recommended way of running entire test suite is as follows. .

No preset environment variables, the entire test suite for a barreleye system
$ OPENBMC_HOST=x.x.x.x tox -e barreleye -- tests

One Method which I can think off, BMC Prompt is set based on the system type. We should login using the given BMC IP address and check the prompt, Based on the trigger the test suite of corresponding systems.

Then our method of invoking test will be simplified further.

Exploring the other better method.

PreTag Test Automation Basic Code clean-up needed

  1. tests/test_fan.robot

*** Settings ***
Documentation This testsuite is for testing fan interface for openbmc
Suite Teardown Delete All Sessions
Resource ../lib/rest_client.robot

*** Test Cases ***
~

~

Shouldn't leave it empty with *** Test cases ****

[ ERROR ] Suite 'Test Fan' contains no tests.

  1. tests/security/test_ssl.robot

Remove : Library RequestsLibrary.RequestsKeywords

The Library RequestsLibrary.RequestsKeywords is already include in the lib/rest_client.robot so no need to add redundant code here

  1. tests/test_association.robot
    Remove : Library BuiltIn
    The built In doesn't need to be explicitly included

Probably a good idea if we could do this two combo in Test Suite Setup

Clear all logs
Open Connection And Log In

  1. tests/test_bootpolicy.robot

Remove :
${SYSTEM_SHUTDOWN_TIME} ${5}
${WAIT_FOR_POWER_OPERATION} 30sec

This variable is not used anywhere in this suite, probably a copy paste left over code.

  1. tests/test_eventlog.robot

Remove : Library BuiltIn
The built In doesn't need to be explicitly included

Typo : making NOT makeing in test case "makeing new log after obmc-phosphor-event.service restart"

Suggestion : Example, its good to verify the execute command to stop continue and fail latter if the command returns errors
${output}= Execute Command /sbin/reboot
To
${output} ${stderr}= Execute Command /sbin/reboot return_stderr=True
Should Be Empty ${stderr}

This would save time and error catching more better
Do for all the execute command in the code

PreTag 0.8 Testing failure for 'Set IP address on valid Interface'

@causten commented on Thu May 19 2016

Full Name: Tests.Test Networkd.Set IP address on valid Interface
Documentation:
This test case sets the ip on the interface and validates that ip address has been set or not. Expectation is the ip address shoTags: GOOD-PATH
Start / End / Elapsed: 20160519 15:22:29.625 / 20160519 15:22:29.627 / 00:00:00.002
Status: FAIL (critical)
Message: Environment variable 'NEW_BMC_IP' does not exist.uld get added.


@anoo1 commented on Mon May 23 2016

@rahulmah seems the env variable doesn't exist in the test case? Could you take a look?


@rahulmah commented on Tue May 24 2016

@anoo1 This seem to have happen because NEW_BMC_IP env variable was not initilize (using export) before running this test case.


@mdmillerii commented on Wed May 25 2016

The testcase should check its requirements and print an clear message when they are not met.

Does the test suite need a configuration file or wrapper script to prompt for this information?


@causten commented on Wed May 25 2016

tox.ini is a wrapper file that holds system type specific information. The I can foresee a need for a system specific file. It would be useful for other issues too like ensuring that 3 different IO or Memory configs all are validated correctly.

I'd like it if we put some thought in to how to do this correctly that supports configs like manual, automation runs and other companies wanting to run the suite

PreTag Set the power restore policy - PDU ENV needs to be automated or Skipped

We have to stream line how the test case execution is done..
No preset environment variables, the entire test suite for a barreleye system
$ OPENBMC_HOST=x.x.x.x tox -e barreleye -- tests

If we are running the suite like this.. the bellow breaks since those PDU info are not populate..

Set the power restore policy

Full Name: Tests.Test Power Restore.Set the power restore policy
Documentation:

This test case sets the pilicy as given under the policy attribute. ExpectedSystemState:-is the state where system should be before running the test case NextSystemState:-is After Power cycle system should reach to this state if the system is not at the Expected System State,This test case brings the system in the Expected state then do the power cycle.
Start / End / Elapsed: 20160530 23:25:10.072 / 20160530 23:30:14.025 / 00:05:03.953
Status: FAIL (critical)
Message: Several failures occurred:

  1. Unable to find variable PDU_TYPE

  2. Unable to find variable PDU_TYPE

  3. Unable to find variable PDU_TYPE

  4. Unable to find variable PDU_TYPE

  5. Unable to find variable PDU_TYPE

  6. Unable to find variable PDU_TYPE

  7. Unable to find variable PDU_TYPE

By default, these data are not populated...

lib/resource.txt
PDU related parameters

${PDU_TYPE} ${EMPTY}
${PDU_IP} ${EMPTY}
${PDU_USERNAME} ${EMPTY}
${PDU_PASSWORD} ${EMPTY}
${PDU_SLOT_NO} ${EMPTY}

Either we have add exclude in the tox.in to skip those test or have it automated in the code resource file..

PreTag: [System - Palmetto Build - 20160622153832 ] Test cases are failing in LED due to below error with post request

4 test case are failing in LED due to below error with post request

Documentation: Fails if objects are unequal after converting them to strings.
Start / End / Elapsed: 20160623 17:22:39.777 / 20160623 17:22:39.778 / 00:00:00.001
17:22:39.777 INFO Argument types are:
<type 'int'>
<type 'unicode'>
17:22:39.778 FAIL 404 != 200

Same issue is also seen with TC - deleting new log after obmc-phosphor-event.service restart - Failing

Documentation: Fails if objects are unequal after converting them to strings.
Start / End / Elapsed: 20160623 17:17:06.415 / 20160623 17:17:06.415 / 00:00:00.000
17:17:06.415 INFO Argument types are:
<type 'int'>
<type 'unicode'>
17:17:06.415 FAIL 404 != 200

PreTag: [System - Palmetto Build - 20160630213138 ] Ipmitool related tests failing due to OPENSSL_1.0.0' not found

Many tests are failing on Polmetto due to "OPENSSL_1.0.0' not found" with latest OpenBMC image[20160630213138]. Test case effected are all ipmitool related. I have taken latest test automation code(https://github.com/mkumatag/openbmc-automation) from old repository as new repository already has problem with ipmitool.

Documentation:
Fails if the given objects are unequal.
Start / End / Elapsed: 20160702 14:20:08.094 / 20160702 14:20:08.095 / 00:00:00.001
14:20:08.095 FAIL /tmp/ipmitool: /usr/lib/libcrypto.so.1.0.0: version `OPENSSL_1.0.0' not found (required by /tmp/ipmitool): 1 != 0

PreTag 0.8 Testing failure for 'Set System Time after setting epoch time'

@causten commented on Thu May 19 2016

Set System Time after setting epoch time
Full Name: Tests.Test Time.Set System Time after setting epoch time
Documentation:

GOOD PATH This test case tries to set system time to epoch time using ipmi and then tries to set to to valid time. Expectation is that new time can be set on a system with epoch time.
Start / End / Elapsed: 20160519 15:28:14.471 / 20160519 15:28:15.108 / 00:00:00.637
Status: FAIL (critical)
Message: Set SEL Time command failed: Unspecified error: 1 != 0


@anoo1 commented on Mon May 23 2016

If I remember correctly, there were some issues setting the epoch time so we were not going to have test cases for it. @tomjoseph83 could you take a look?


@rahulmah commented on Tue May 24 2016

@anoo1 : I have open below pull request to remove this epoch test case.
mkumatag/openbmc-automation#54

PreTag 0.8 Testing failure for 'user/group authentication'

@causten commented on Thu May 19 2016

6 failures, I am using one issue to resolve all

Create and delete user with user group name
Full Name: Tests.Test User.Create and delete user with user group name
Documentation:

GOOD PATH This testcase is for testing user creation with user name, password, comment and group name(user group) in open bmc.
Start / End / Elapsed: 20160519 15:28:31.740 / 20160519 15:28:40.484 / 00:00:08.744
Status: FAIL (critical)
Message: Authentication failed for user 'HuHkThIS'.

Create multiple users
Full Name:  Tests.Test User.Create multiple users
Documentation:  

**GOOD PATH** This testcase is to verify that multiple users creation in open bmc.
Start / End / Elapsed:  20160519 15:28:40.484 / 20160519 15:28:48.145 / 00:00:07.661
Status:     FAIL (critical)
Message:    Authentication failed for user 'mrnviL4h'.

Create and delete user without password
Full Name: Tests.Test User.Create and delete user without password
Documentation:

GOOD PATH This testcase is to create and delete a user without password in open bmc.
Start / End / Elapsed: 20160519 15:28:48.146 / 20160519 15:28:57.151 / 00:00:09.005
Status: FAIL (critical)
Message: Authentication failed for user 'nxeznfvp'.

 Set password for existing user
Full Name:  Tests.Test User.Set password for existing user
Documentation:  

**GOOD PATH** This testcase is for testing password set for user in open bmc.
Start / End / Elapsed:  20160519 15:28:57.152 / 20160519 15:29:04.658 / 00:00:07.506
Status:     FAIL (critical)
Message:    Authentication failed for user 'BaToCj2H'.

Set password with empty password for existing
Full Name: Tests.Test User.Set password with empty password for existing
Documentation:

GOOD PATH This testcase is to verify that empty password can be set for a existing user.
Start / End / Elapsed: 20160519 15:29:04.658 / 20160519 15:29:12.031 / 00:00:07.373
Status: FAIL (critical)
Message: Authentication failed for user '6mm7Lxrk'.



---

@rahulmah commented on [Tue Jun 14 2016](https://github.com/openbmc/openbmc/issues/290#issuecomment-225869533)

@hramasub : Please provide update on this issue.

620 Barreleye build tests hangs at Execute Set Sensor boot count

Loaded barreleye-20160602031800.all.tar on 9.3.23.30 and kicked off long run, but
didnt cross even single iteration. Tried the manual long run test and found TC
"Execute Set Sensor boot count" hangs.. Need to check why it is not time out or
what caused this issue.

PreTag: [System - Palmetto Build - 20160630213138 ] Palmetto system is loosing ip after warm reset TC with latest OpenBMC image

All test are failing after Onetime boot order after warm reset TC (while running entire automation suite). Seem like system is going into bad state and ip is lost after warm reset on Palmetto system with latest OpenBMC image.

Full Name: Tests.Test Bootpolicy.Onetime boot order after warm reset
Documentation:
This testcase is to verify that boot policy and order does not change after warm reset on a system with onetime boot policy.
Start / End / Elapsed: 20160702 14:22:57.073 / 20160702 14:25:59.547 / 00:03:02.474
Status: FAIL (critical)
Message: Keyword 'Is Power On' failed after retrying for 3 minutes. The last error was: ConnectTimeout: HTTPSConnectionPoo

Later all test are failing at the login itself.
Max retries exceeded with url: /login (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10de76750>,

PreTag 0.8 Testing failure for 'get names /'

@causten commented on Thu May 19 2016

Full Name: Tests.Test Obmcrest.get names /
Start / End / Elapsed: 20160519 15:23:39.010 / 20160519 15:23:53.120 / 00:00:14.110
Status: FAIL (critical)
Message: ConnectionError: HTTPSConnectionPool(host='9.3.23.24', port=443): Max retries exceeded with url: /enumerate (Caused by ReadTimeoutError("HTTPSConnectionPool(host='9.3.23.24', port=443): Read timed out. (read timeout=5.0)",))
00:00:14.109 KEYWORD ${resp} = rest_client . OpenBMC Get Request /enumerate


@anoo1 commented on Mon May 23 2016

What is the test case trying to do? @rahulmah could you take a look?


@rahulmah commented on Tue May 24 2016

@anoo1 : 'get names /' internally fo GET for /enumerate

}rahuls-MacBook-Pro:~ rahulmaheshwari$ curl -c cjar -b cjar -k -X GET -d "{"data":[]}" https://9.3.23.30/enumerate
{
"data": {
"/org/openbmc": {},
"/org/openbmc/HostIpmi/1": {},
"/org/openbmc/NetworkManager/Interface": {},
"/org/openbmc/UserManager/Group": {},
"/org/openbmc/UserManager/Groups": {},
"/org/openbmc/UserManager/User": {},
"/org/openbmc/UserManager/Users": {},
"/org/openbmc/buttons": {},
"/org/openbmc/buttons/power0": {
"state": 0,
"timer": 0
},
"/org/openbmc/buttons/reset0": {
"state": 0,

PreTag 0.8 Testing failure for 'Set the power with string of characters'

@causten commented on Thu May 19 2016

Robot Test Case failed
Full Name: Tests.Test Generic Conf.Set the power with string of characters
Documentation:

BAD PATH This test case set the power values with string of characters Expectation is to return error.
Start / End / Elapsed: 20160519 15:17:43.333 / 20160519 15:17:46.618 / 00:00:03.285
Status: FAIL (critical)
Message: ''abcdefg'=='abcdefg'' should not be true.


@rahulmah commented on Tue Jun 14 2016

@ratagupt : Can you please look at this failure? I think this test case was never working.

PreTag: [System - barreleye Build - 20160610155319 ] Disable Syslog

@gkeishin commented on Mon Jun 13 2016

While Running the test code .. we found that our test looks for the REST Object /org/openbmc/LogManager/rsyslog/action/Disable Which it doesn't find it..

Please let us know if this is expected or if the object path we are using in the test needs to be changed or updated..

Logs and some inputs for your reference

Disable Syslog
[Documentation] _GOOD PATH_
... This testcase is to verify disabling syslog.\n

${resp} =    Disable Syslog Setting    ${EMPTY}
Should Be Equal    ${resp}    ok          <---- Failed 

${ret} = RequestsLibrary.RequestsKeywords . Post Request openbmc, ${base_uri}, &{kwargs}
Documentation:

Send a POST request on the session object found using the
Start / End / Elapsed: 20160613 12:34:04.695 / 20160613 12:34:04.778 / 00:00:00.083
12:34:04.777 INFO Post Request using : alias=openbmc, uri=/org/openbmc/LogManager/rsyslog/action/Disable, data={"data": [""]}, headers={u'Content-Type': u'application/json'}, files=None, allow_redirects=True
12:34:04.778 INFO ${ret} = <Response [404]>

root@barreleye:~# cat /etc/version
20160610155319

}rango@ubuntu:~/TOOLS_OPENBMC/tools/obmc_dvt$ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X GET https://9.3.23.32//org/openbmc/
{
"data": [
"/org/openbmc/control",
"/org/openbmc/managers",
"/org/openbmc/HostServices",
"/org/openbmc/settings",
"/org/openbmc/UserManager",
"/org/openbmc/buttons",
"/org/openbmc/records",
"/org/openbmc/inventory",
"/org/openbmc/watchdog",
"/org/openbmc/sensors",
"/org/openbmc/HostIpmi"
],
"message": "200 OK",
"status": "ok"


@rahulmah commented on Tue Jun 14 2016

@hramasub : Syslog related test are failing. Seem like syslog server code is still not in the build. Please confirm.

Response code:404, Content:{
"data": {
"description": "org.openbmc.objectmapper.Error.NotFound: path or object not found: /org/openbmc/LogManager/rsyslog"
},
"message": "404 Not Found",
"status": "error"

20160707143158:Barreleye:Build141: Host is in booting state for more than 18 minutes

root@barreleye:/etc# obmcutil state
= HOST_BOOTING
root@barreleye:/etc# obmcutil bootprogress
units =
value = FW Progress, Baseboard Init
error = 0
root@barreleye:/etc# date
Sat Jul 9 18:12:29 UTC 2016
root@barreleye:/etc# date; obmcutil bootprogress; date
Sat Jul 9 18:12:46 UTC 2016
units =
value = FW Progress, Baseboard Init
error = 0

Sat Jul 9 18:12:48 UTC 2016

root@barreleye:/etc# obmcutil state; obmcutil bootprogress;date
= HOST_BOOTING
units =
value = FW Progress, Baseboard Init
error = 0
Sat Jul 9 18:31:19 UTC 2016
root@barreleye:/etc#

PreTag Blink Fast the Beep LED - Test case pre req check fix needed

The beep FRU is not available in Palmetto /org/openbmc/control/led/beep. So the test case ended failure..

So this needs to be fix as pre-req check if this FRU is available or not then proceed.

The sample psuedo code would look like as per Chris Austen input..

Get Inventory List
[arguments] ${args}
${list} = Get Inventory Fru Type List ${OPENBMC_MODEL} ${args}
: FOR ${element} IN @{list}
\ ${d} = Get From Dictionary ${SYSTEM_INFO} ${element}
\ Run Keyword If ${d['present']} == True Verify Present Properties ${args}

Verify Present Properties
[arguments] ${args}
${data} = create dictionary data=@{EMPTY}
${resp} = OpenBMC Post Request /org/openbmc/sensor/led/${args} data=${data}
should be equal as strings ${resp.status_code} ${HTTP_OK}
${json} = to json ${resp.content}
should be equal as integers ${json['data']} 0

This needs to be rework in general way to skip the test if the LED is not available...

PreTag test_power_restore.robot': Non-existing setting '[Documentation]'

[ ERROR ] Error in file '/home/rango/FTC_OPENBMC_TEST/openbmc-automation/tests/test_power_restore.robot': Non-existing setting '[Documentation]'.
[ ERROR ] Suite 'Test Power Restore' contains no tests without tag 'reboot tests'.

There is a extra Documentation in the setting .

Since the tox.in uses that tag to look into the test suite, the template here having this tag failed during lookup..
[Tags] reboot_tests

So the solution we could do is to add the tags in the keywords....

$ git whatchanged tests/test_power_restore.robot
commit 2ce8f53
Author: Ratan Gupta [email protected]
Date: Thu Mar 3 15:43:45 2016 +0530

Test automation for power restoration policy

Few more changes in test cases

Changes made as per the new interfaces

:000000 100644 0000000... d0e27d5... A tests/test_power_restore.robot

commit 2ce8f53
Author: Ratan Gupta [email protected]
Date: Thu Mar 3 15:43:45 2016 +0530

Test automation for power restoration policy

Few more changes in test cases

Changes made as per the new interfaces

:000000 100644 0000000... d0e27d5... A tests/test_power_restore.robot

...................................................
*** Settings ***
Documentation This suite will verifiy the power restore policy rest Interfaces
... Details of valid interfaces can be found here...
... https://github.com/openbmc/docs/blob/master/rest-api.md

Resource ../lib/rest_client.robot
Resource ../lib/pdu/pdu.robot
Resource ../lib/utils.robot

Library SSHLibrary

[Documentation] Data Driven Tests <----- This needs to be removed

test cases

Set the power restore policy Policy ExpectedSystemState NextSystemState

                           LEAVE_OFF              HOST_POWERED_OFF          HOST_POWERED_OFF
                           LEAVE_OFF              HOST_POWERED_ON           HOST_POWERED_OFF
                           ALWAYS_POWER_ON        HOST_POWERED_OFF          HOST_POWERED_ON
                           ALWAYS_POWER_ON        HOST_POWERED_ON           HOST_POWERED_ON
                           RESTORE_LAST_STATE     HOST_POWERED_ON           HOST_POWERED_ON
                           RESTORE_LAST_STATE     HOST_POWERED_OFF          HOST_POWERED_OFF

[Documentation] This test case sets the pilicy as given under the policy attribute.
... ExpectedSystemState:-is the state where system should be before running the test case
... NextSystemState:-is After Power cycle system should reach to this state
... if the system is not at the Expected System State,This test case brings the system
... in the Expected state then do the power cycle.

[Template] setRestorePolicy
[Tags] reboot_tests <------------ Applies to all test case

PreTag 0.8 Testing failure for 'Get OCC Status'

@causten commented on Thu May 19 2016

Get OCC status
Full Name: Tests.Test Occ Powercap.Get OCC status
Documentation:

This testcase is to test the OCCstatus for the system is Enabled or not
Start / End / Elapsed: 20160519 15:24:54.197 / 20160519 15:24:57.960 / 00:00:03.763
Status: FAIL (critical)
Message: != Enabled


@anoo1 commented on Mon May 23 2016

The powercap should be available and working through the sensors. Perhaps the test case is looking at the settings file. @rahulmah could you take a look?

20160707143158:Barreleye:Build141: All Inventory Test Cases fails due to suite setup fail

root@barreleye:# cat /etc/version
20160707143158
root@barreleye:
# cat /etc/os-release
ID="openbmc-phosphor"
NAME="Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro)"
VERSION="0.1.0 (krogoth)"
VERSION_ID="v1.0-67-g2ad67f6-dirty"
PRETTY_NAME="Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro) 0.1.0 (krogoth)"
BUILD_ID="v1.0"
root@barreleye:#
root@barreleye:
#
root@barreleye:# obmcutil state
= HOST_BOOTED
root@barreleye:
# obmcutil host
debug_mode = 0
flash_side = primary
root@barreleye:~# obmcutil bootprogress
units =
value = FW Progress, Starting OS
error = 0

But Suite Setup for Inventory Test suite fails because of following statement
"Wait Until Keyword Succeeds 3 min 10 sec Is Power On"

Suite setup failed:

Keyword 'Is Power On' failed after retrying for 3 minutes. The last error was: FW Progress, Baseboard Init != FW Progress, Starting OS
00:03:02.087 SETUP Setup The Suite
Start / End / Elapsed: 20160709 20:34:19.627 / 20160709 20:37:21.714 / 00:03:02.087
00:03:02.087 KEYWORD utils . Power On Host
Start / End / Elapsed: 20160709 20:34:19.627 / 20160709 20:37:21.714 / 00:03:02.087
00:00:00.000 KEYWORD @{arglist} = BuiltIn . Create List
00:00:00.000 KEYWORD ${args} = BuiltIn . Create Dictionary data=@{arglist}
00:00:02.064 KEYWORD ${resp} = rest_client . Call Method /org/openbmc/control/chassis0/, powerOn, data=${args}
Start / End / Elapsed: 20160709 20:34:19.630 / 20160709 20:34:21.694 / 00:00:02.064
00:00:00.001 KEYWORD ${base_uri} = BuiltIn . Catenate SEPARATOR=, ${DBUS_PREFIX}, ${uri}
00:00:02.063 KEYWORD ${resp} = rest_client . OpenBMC Post Request ${base_uri}/action/${method}, &{kwargs}
20:34:21.694 INFO ${resp} = <Response [200]>
00:00:00.000 KEYWORD BuiltIn . Should Be Equal As Strings ${resp.status_code}, ${HTTP_OK}
Documentation:

Fails if objects are unequal after converting them to strings.
Start / End / Elapsed: 20160709 20:34:21.695 / 20160709 20:34:21.695 / 00:00:00.000
20:34:21.695 INFO Argument types are:
<type 'int'>
<type 'unicode'>
00:03:00.019 KEYWORD BuiltIn . Wait Until Keyword Succeeds 3 min, 10 sec, Is Power On
Documentation:

Runs the specified keyword and retries if it fails.
Start / End / Elapsed: 20160709 20:34:21.695 / 20160709 20:37:21.714 / 00:03:00.019
00:00:01.708 KEYWORD utils . Is Power On
Start / End / Elapsed: 20160709 20:34:21.696 / 20160709 20:34:23.404 / 00:00:01.708

[Qemu] Enabling test-suite run

To enable Qemu for tests run , it will required to make the following changes

  1. Consolidate SSH connection
  • There are bunch of test-suites which uses the same SSH connection keywords and are redundant in many files. This needs to be fix
  1. The SSH port and HTTP port variable needs to be added in resource file declaration
  2. The Consolidated SSH connection should differentiate the connection based on the model

IPMI / RedFish Test

There was some discussion on moving to Redfish for FSP. Thought same will happen to OpenBMC as well. Lets wait and watch. Corresponding development story as of now is openbmc/openbmc#360

[Barreleye/Palmetto - build v1.0-89-g5bc571e-dirty ] Test Firmware Version Regex failed

Expectation regex for version v1.0-89-g5bc571e but got v1.0-89-g5bc571e-dirty

Test Firmware Version :: This testcase is for testing the fw version. | FAIL |
'"v1.0-89-g5bc571e-dirty"' does not match '^v\d+.\d+'

Should Match Regexp ${jsondata["data"]["version"]} ^v\d+.\d+

This could be fix in the test case.. but just wanted to understand if this "-dirty" suffix in the version, is this to be going forward this format ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.