Ask a Question

Get APK memory RAM Android application

David91
Frequent Contributor

Get APK memory RAM Android application

Hi it is possible to detect the current ram memory of the tested application via Testcomplete javascript. Could someone advise me how to solve this... ?

 

Thank you

10 REPLIES 10
rraghvani
Champion Level 3

David91
Frequent Contributor

Thank you but I would need to find out using a script

rraghvani
Champion Level 3

You can invoke a PowerShell script to return the information you need. For example,

 

 

Get-CimInstance -ClassName Win32_Process -Filter "Name='TestComplete.exe'"

 

 

Will return,

rraghvani_0-1670340088096.png

Script will look so,

rraghvani_1-1670340542237.png

 

I'm assuming there will be something similar for Android, using adb?

Hi,

 

https://www.repeato.app/how-to-automatically-check-memory-usage-of-you-app/ might provide you with possible solution.

 

Regards,
  /Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
David91
Frequent Contributor

Yes i use ADB emulator for tests

rraghvani
Champion Level 3

See https://stackoverflow.com/questions/14042687/cpu-usage-per-application-in-android/19889090#19889090, it mentions the command adb shell top -m 10

 

Once you've got the correct command to get the information you require, you can then use that, in the sample script that I provided above.

 

 

David91
Frequent Contributor

Can I also use this adb command in powershell?

 

David91_0-1670415864267.png

 

rraghvani
Champion Level 3

Yes you can, providing your path is correctly setup

rraghvani_1-1670417711097.png

Use whatever you find easier. I just prefer PowerShell over Command Prompt

David91
Frequent Contributor

i try it.. but return  .. ReferenceError: deviceConnector is not defined

cancel
Showing results for 
Search instead for 
Did you mean: