Partager via


Battery API Tests (Compact 7)

3/12/2014

The Battery API Test assesses the behavior of the battery application programming interface (API) sets. This test verifies that the battery APIs process parameters correctly and return correct values.

You may want to run this test to verify the battery driver from the API level. It will tell you if the battery sets power status correctly.

Test Prerequisites

Your device must meet the following requirements before you run this test.

The following table shows the requirement for the Battery API Test.

Requirement Description

Tux.exe

Test harness, required for executing the test.

Kato.dll

Logging engine, required for logging test data.

batapitest.dll

Library containing the test cases.

Subtests

The table below lists the subtests included in this test.

SubTest ID Description

1001

This test checks the implementation of GetSystemPowerStatusEx2 function. The test calls the function with various correct and incorrect parameters and verifies if the results are as expected.

1002

This test checks the implementation of BatteryDrvrGetLevels function.

1003

This test checks the implementation of BatteryDrvrSupportsChangeNotification function.

1004

This test checks the implementation of BatteryGetLifeTimeInfo function. The test calls the function with various correct and incorrect parameters and verifies if the results are as expected.

Setting Up the Test

This test is already set up.

Running the Test

Run the test and then view the log to see the test results.

Verifying the Test

When the test completes running, verify that "PASS" appears in the test log for all subtests.

Troubleshooting the Test

  • Make sure a battery driver is included in the current OS design.
  • Determine the point of failure and record the exact error message.
  • Check that the setup steps were followed and that all pre-requisites were met.
  • If the source code is available, examine the point of failure in code to see if any additional information can be gathered about the failure domain.

For additional platform specific issues, consult the CTK articles on the TechNet wiki.

See Also

Other Resources

Battery Tests