battery_basic¶
Source code: battery_basic.py
A basic battery test.
Description¶
This is a basic battery test that charges and discharges the battery on DUT. The goal of this factory test is to perform a quick basic verification of battery functions (typically less than 30 seconds).
Test Procedure¶
Prompt the operator to plug in the AC power source.
The battery current is sampled periodically, and its value is checked.
Prompt the operator to unplug the AC power source.
The battery current is sampled periodically, and its value is checked.
Prompt the operator to plug in the AC power source, again.
The battery current is sampled periodically, and its value is checked.
Dependency¶
Depend on the sysfs driver to control and read information from the battery.
Examples¶
To perform a basic battery test, add this in test list:
{
"pytest_name": "battery_basic",
"label": "Battery Basic",
"exclusive_resources": [
"POWER"
],
"related_components": [
"test_tags.TestCategory.BATTERY"
]
}
To relax the limitation of battery cycle count to 5:
{
"pytest_name": "battery_basic",
"label": "Battery Basic Cycle Count At Most 5",
"exclusive_resources": [
"POWER"
],
"related_components": [
"test_tags.TestCategory.BATTERY"
],
"args": {
"max_cycle_count": 5
}
}
Test Arguments¶
Name |
Type |
Description |
---|---|---|
charge_duration_secs |
int, float |
(optional; default: |
discharge_duration_secs |
int, float |
(optional; default: |
min_charge_current_mA |
int, float, None |
(optional; default: |
min_discharge_current_mA |
int, float |
(optional; default: |
current_sampling_period_secs |
int, float |
(optional; default: |
max_cycle_count |
int |
(optional; default: |