Redfish Basic Tests

This manual test verifies server hardware out-of-band management capability using the Distributed Management Task Force (DMTF) Redfish standard and Windows PowerShell.

Test details

   
Specifications
  • System.Server.BMC.Redfish.Basic
Platforms
  • Windows Server 2016 (x64)
Supported Releases
  • Windows 10, version 1511
  • Windows 10, version 1607
  • Windows 10, version 1703
  • Windows 10, version 1709
  • Windows 10, version 1803
  • Windows 10, version 1809
  • Windows 10, version 1903
  • Next update to Windows 10
Expected run time (in minutes) 5
Category Scenario
Timeout (in minutes) 300
Requires reboot false
Requires special configuration false
Type automatic

 

Additional documentation

Tests in this feature area might have additional documentation, including prerequisites, setup, and troubleshooting information, that can be found in the following topic(s):

Running the test

Note

  The target Redfish server that is going through the certification process must be on the same network as the Windows-based computer where the client-side tests will run.

 

The tests require two computers:

  • Redfish client - A Windows-based computer selected in HLK Studio. The HLK job runs on this computer after the job is manually scheduled. The HLK job starts a Windows PowerShell process that loads the Pester test framework. The test framework then runs the actual test file, Pester.Redfish.HLK.Tests.ps1.
  • Redfish server - A remote Redfish-compatible device that these tests verify. You must specify the IP address and credential information of this device as parameters when you schedule a test on the Redfish client.

Troubleshooting

For generic troubleshooting of HLK test failures, see Troubleshooting Windows HLK Test Failures.

Error: The Execute Task with Commandline cmd /c powershell.exe -c ... Failed with ExitCode N

The task exited with an exit code other than the ExpectedTaskExitCode. This may cause the task to fail if it is set to Fail On Exit Code.

The exit code of the Windows PowerShell process indicates the number of test failures. For a successful test run, ExpectedTaskExitCode is set to 0. A non-zero value (for example, "Failed with ExitCode 3") indicates the corresponding number of failed tests.

Workaround:

  1. Identify what tests failed by using either of the following methods:

    • Review the log file RedfishTestRunLog.xml.
    • Manually run the tests again in a Windows PowerShell console on the Redfish client computer.
  2. Debug the failed tests by using Windows PowerShell ISE on the Redfish client computer.

More information

Note

   When scheduling these tests, you must always specify values for the RedfishUri, RedfishUserName, and RedfishPassword parameters. The tests will fail if the default values are not replaced.

The TestDestFolder, RedfishMetadataUri, and AdditionalData parameters do not need to be changed for the tests to succeed.

 

Manually run the tests in a Windows PowerShell console

Note that the test files are located on the Redfish client computer in a folder specified by the [TestDestFolder] parameter. By default, this is [SYSTEMDRIVE]\RedfishLogo.

  1. Ensure that the Redfish.Device.Config.json file (in the folder specified by the [TestDestFolder] parameter) has the correct information about the Redfish server. If this file is missing, run the following Windows PowerShell command to generate the file. In the command, replace the parameter values with what is used by the Redfish server.

    PS C:\Users\Administrator> C:\RedfishLogo\CreateRedfishDeviceConfig.ps1 -RedfishUri 'https://10.20.30.40' -RedfishUserName 'root' -RedfishPassword 'testpass'
    
  2. Load the Pester Windows PowerShell module. This is a Windows PowerShell-based test harness.

    Import-Module Pester -Force
    
  3. Run the tests.

    PS C:\Users\Administrator> C:\RedfishLogo\Pester.Redfish.HLK.Tests.ps1
    

    The failed tests will be highlighted in red.

Debug the failed tests in Windows PowerShell ISE

Note that the test files are located on the Redfish client computer in a folder specified by the [TestDestFolder] parameter. By default, this is [SYSTEMDRIVE]\RedfishLogo.

  1. Start Windows PowerShell ISE from the Start menu.

  2. Ensure that the Redfish.Device.Config.json file has correct information about the Redfish server. If this file is missing, run the following Windows PowerShell command to generate the file. In the command, replace the parameter values with what is used by the Redfish server.

    PS C:\Users\Administrator> C:\RedfishLogo\CreateRedfishDeviceConfig.ps1 -RedfishUri 'https://10.20.30.40' -RedfishUserName 'root' -RedfishPassword 'testpass'
    
  3. Load the Pester Windows PowerShell module in the Windows PowerShell ISE command window. This is a Windows PowerShell-based test harness.

    Import-Module Pester -Force
    
  4. In Windows PowerShell ISE, open the test file (press Ctrl + O) [TestDestFolder]\Pester.Redfish.HLK.Tests.ps1.

  5. Find the code for the failing test. Individual tests are marked by the It keyword (for example, It "Verify that service meets Redfish Authentication requirements for different resources.")

  6. Set a breakpoint in the failing test. To do this, put the cursor on the first line of the test, and then press F9 (Toggle Breakpoint).

  7. Press F5 (Run Script) to run the tests. The test run should stop on the breakpoint that you set in the previous step.

  8. Use commands from the Debug menu to step through the code and investigate errors. See How to Debug Scripts in Windows PowerShell ISE.

Parameters

Parameter name Parameter description
TestDestFolder Folder where test content will be deployed on the client machine.
RedfishUri Uri of Redfish service
RedfishMetadataUri Uri of Redfish service metadata
RedfishUserName User that has access to Redfish service
RedfishPassword Password of user that has access to Redfish service
AdditionaData Any additional data that needs to be passed to tests