I am new to Android and Appium. I have a java test case that uses Appium. It performs actions like scroll, tap etc using Appium driver commands. In this test I need to report the value of the CPU Util of tha Application. I found this peice of code online.
RandomAccessFile reader = new RandomAccessFile("/proc/stat", "r"); String load = reader.readLine();
String[] toks = load.split(" +"); // Split on one or more spaces
idle1 = Long.parseLong(toks[4]);
cpu1 = Long.parseLong(toks[2]) + Long.parseLong(toks[3]) + Long.parseLong(toks[5])
+ Long.parseLong(toks[6]) + Long.parseLong(toks[7]) + Long.parseLong(toks[8]);
However how do I run this code inside the Appium java project on eclipse since I do not have an android project?
Thanks a lot for the help in advance