charger¶
Source code: charger.py
Test if the charger can charge battery in time.
Description¶
Test that charger can charge/discharge battery for certain amount of change within certain time under certain load.
Test Procedure¶
The battery and AC must present before running the test.
This is an automated test without user interaction.
Dependency¶
Device API cros.factory.device.power.
Examples¶
A test that charges/discharges until the battery percentage is 87 with 1 hour timeout:
{
"pytest_name": "charger",
"label": "Charger",
"exclusive_resources": [
"POWER"
],
"related_components": [
"test_tags.TestCategory.BATTERY"
],
"args": {
"min_starting_charge_pct": 87,
"max_starting_charge_pct": 87,
"check_battery_current": false,
"starting_timeout_secs": 3600,
"spec_list": []
}
}
Test Arguments¶
Name |
Type |
Description |
---|---|---|
min_starting_charge_pct |
int, float |
(optional; default: |
max_starting_charge_pct |
int, float |
(optional; default: |
starting_timeout_secs |
int |
(optional; default: |
check_battery_current |
bool |
(optional; default: |
battery_check_delay_sec |
int |
(optional; default: |
verbose_log_period_secs |
int |
(optional; default: |
log_period_secs |
int |
(optional; default: |
use_percentage |
bool |
(optional; default: |
charger_type |
str, None |
(optional; default: |
spec_list |
list |
(optional; default: |