Swollen battery - how to prevent it in mobile lab? Is UFT Mobile can help there?

over 1 year ago


There are a number of possible reasons that a lithium-ion battery can swell. The most common cause is an overcharge of the battery, which causes a chemical reaction between the electrodes and the electrolyte, resulting in the release of heat and gases that expand inside the battery, causing the casing to swell or even to split open. Swelling can also result from a poor cell build, somewhat common in very low-grade batteries from some overseas manufacturers. Mechanical damage to the battery, such as striking a hard surface and denting the casing, can definitely cause a swelling condition, as can exposure to excessive high temperatures. Finally, lithium-ion batteries can swell as a result of a deep discharge of the cells; usually lithium-ion batteries are governed by circuitry (sometimes called a battery management system or BMS) that prevents this from happening.


This process produces a great deal of heat, which in turn warms the gases inside the battery, causing them to expand. Lithium-ion batteries are not designed to be ventilated, and so the the battery’s casing expands with the gasses, distorting and warping its appearance into that familiar swollen look.


The device battery should be monitored for his temperature. There is also an indication of "battery health", but it is available only for Android devices.

When device battery temperature is higher than expected, the device can be moved to specific workspace that can be used for the UFTM Administrator to inspect and resolve the issue (replace the device battery, etc.).

UFT Mobile version 3.3 introduces a new capability for device states: battery state, WiFi state, screen brightness, etc. in addition to standard metrics for CPU, RAM and Disk.

This information is available on device cart (METRICS properties) as well as via REST API (GET /rest/v2/device/{deviceId}/states).

The example bellow (python with requests) demonstrate usage of this REST API to get devices battery temperature (attached as well in py format):


import sys,json, requests
degree_sign= u'\N{DEGREE SIGN}' 'C'


s = requests.Session()
url = BASE_URL '/oauth2/token'
headers = {'Accept': 'application/json' , 'Content-Type': 'application/json; charset=UTF-8'}
payload = {'client': '<OAUTH2-TOKEN>' , 'secret': '<OAUTH2-SECRET>' , 'tenant': <TENANT_ID>}

response = s.post(url, headers=headers, data=json.dumps(payload))

if response.status_code == requests.codes.ok:
hp4msecret = response.headers['x-hp4msecret']
access_token = response.json()['access_token']

if response.status_code == requests.codes.ok:
url = BASE_URL '/deviceContent'
headers = {'x-hp4msecret': hp4msecret, 'Authorization': 'Bearer ' access_token}
response = s.get(url, headers=headers)

if response.status_code == requests.codes.ok:
for device in response.json():
deviceName = device["deviceName"]
udid = device["udid"]
url = BASE_URL '/v2/device/' udid '/states'
response = s.get(url, headers=headers)
temperature = response.json()['battery']['temperature']
print (deviceName ": " str(temperature) degree_sign)

Comment List
Related Discussions