George Keishing | 5f56ce7 | 2025-03-20 15:12:16 +0530 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Test BMC using |
| 3 | ... https://github.com/DMTF/Redfish-Protocol-Validator |
| 4 | ... DMTF tool. |
| 5 | |
| 6 | Library OperatingSystem |
| 7 | Resource ../../lib/dmtf_tools_utils.robot |
| 8 | |
| 9 | Test Setup Test Setup Execution |
| 10 | |
| 11 | *** Variables *** |
| 12 | |
| 13 | ${DEFAULT_PYTHON} python3 |
| 14 | |
| 15 | ${rsv_github_url} https://github.com/DMTF/Redfish-Protocol-Validator |
| 16 | ${rsv_dir_path} Redfish-Protocol-Validator |
| 17 | |
| 18 | ${command_string} ${DEFAULT_PYTHON} ${rsv_dir_path}${/}rf_protocol_validator.py |
| 19 | ... -r ${OPENBMC_HOST}:${HTTPS_PORT} |
| 20 | ... -u ${OPENBMC_USERNAME} |
| 21 | ... -p ${OPENBMC_PASSWORD} |
| 22 | ... --no-cert-check |
| 23 | ... |
| 24 | |
| 25 | ${branch_name} main |
| 26 | |
| 27 | *** Test Cases *** |
| 28 | |
| 29 | Test BMC Redfish Protocol Validator |
| 30 | [Documentation] The Redfish Protocol Validator tests the HTTP protocol |
| 31 | ... behavior of a Redfish service to validate that it |
| 32 | ... conforms to the Redfish Specification. |
| 33 | [Tags] Test_BMC_Redfish_Protocol_Validator |
| 34 | |
| 35 | ${rc} ${output}= Run DMTF Tool ${rsv_dir_path} ${command_string} check_error=1 |
| 36 | |
| 37 | # Example output and fail count regex: |
| 38 | # Summary - PASS: 61, WARN: 1, FAIL: 42, NOT_TESTED: 60 |
| 39 | # Fail count group returned from regex ['FAIL: 42', '42'] |
| 40 | |
| 41 | ${fail_count}= Should Match Regexp ${output} FAIL: (\\d+) |
| 42 | |
| 43 | Run Keyword If ${fail_count[1]} != 0 |
| 44 | ... Fail Redfish Protocol Validator Failed |
| 45 | |
| 46 | |
| 47 | *** Keywords *** |
| 48 | |
| 49 | Test Setup Execution |
| 50 | [Documentation] Do test case setup tasks. |
| 51 | |
| 52 | Download DMTF Tool ${rsv_dir_path} ${rsv_github_url} ${branch_name} |