From 500717b0fbecfa37748801be5a85e7777bd3a42f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=99=A9=ED=9D=AC=EC=84=A0?= Date: Sun, 29 Jan 2017 21:51:50 +0900 Subject: [PATCH 01/16] add apis to read the performance data --- .../io/appium/java_client/MobileCommand.java | 12 +++++ .../java_client/android/AndroidDriver.java | 49 ++++++++++++++++++ .../android/AndroidMobileCommandHelper.java | 50 +++++++++++++++++++ .../android/AndroidDriverTest.java | 30 +++++++++++ 4 files changed, 141 insertions(+) diff --git a/src/main/java/io/appium/java_client/MobileCommand.java b/src/main/java/io/appium/java_client/MobileCommand.java index 7a87eb8a4..ed0a530fd 100644 --- a/src/main/java/io/appium/java_client/MobileCommand.java +++ b/src/main/java/io/appium/java_client/MobileCommand.java @@ -48,6 +48,10 @@ public class MobileCommand { protected static final String GET_DEVICE_TIME; protected static final String GET_SESSION; + protected static final String GET_PERFORMANCE_DATA; + protected static final String GET_SUPPORTED_PERFORMANCE_DATA_TYPES; + + protected static final String HIDE_KEYBOARD; protected static final String LOCK; //iOS @@ -92,6 +96,9 @@ public class MobileCommand { GET_DEVICE_TIME = "getDeviceTime"; GET_SESSION = "getSession"; + GET_PERFORMANCE_DATA = "getPerformanceData"; + GET_SUPPORTED_PERFORMANCE_DATA_TYPES = "getSuppportedPerformanceDataTypes"; + HIDE_KEYBOARD = "hideKeyboard"; LOCK = "lock"; SHAKE = "shake"; @@ -136,6 +143,11 @@ public class MobileCommand { commandRepository.put(SET_SETTINGS, postC("/session/:sessionId/appium/settings")); commandRepository.put(GET_DEVICE_TIME, getC("/session/:sessionId/appium/device/system_time")); commandRepository.put(GET_SESSION,getC("/session/:sessionId/")); + commandRepository.put(GET_SUPPORTED_PERFORMANCE_DATA_TYPES, + postC("/session/:sessionId/appium/performanceData/types")); + commandRepository.put(GET_PERFORMANCE_DATA, + postC("/session/:sessionId/appium/getPerformanceData")); + //iOS commandRepository.put(SHAKE, postC("/session/:sessionId/appium/device/shake")); commandRepository.put(TOUCH_ID, postC("/session/:sessionId/appium/simulator/touch_id")); diff --git a/src/main/java/io/appium/java_client/android/AndroidDriver.java b/src/main/java/io/appium/java_client/android/AndroidDriver.java index 8b9bd93df..6f1d15fc7 100644 --- a/src/main/java/io/appium/java_client/android/AndroidDriver.java +++ b/src/main/java/io/appium/java_client/android/AndroidDriver.java @@ -17,6 +17,8 @@ package io.appium.java_client.android; import static io.appium.java_client.android.AndroidMobileCommandHelper.endTestCoverageCommand; +import static io.appium.java_client.android.AndroidMobileCommandHelper.getPerformanceDataCommand; +import static io.appium.java_client.android.AndroidMobileCommandHelper.getSupportedPerformanceDataTypesCommand; import static io.appium.java_client.android.AndroidMobileCommandHelper.openNotificationsCommand; import static io.appium.java_client.android.AndroidMobileCommandHelper.toggleLocationServicesCommand; @@ -31,9 +33,11 @@ import org.openqa.selenium.Capabilities; import org.openqa.selenium.WebElement; import org.openqa.selenium.remote.HttpCommandExecutor; +import org.openqa.selenium.remote.Response; import org.openqa.selenium.remote.http.HttpClient; import java.net.URL; +import java.util.List; /** * @param the required type of class which implement {@link org.openqa.selenium.WebElement}. @@ -152,6 +156,51 @@ public AndroidDriver(Capabilities desiredCapabilities) { super(substituteMobilePlatform(desiredCapabilities, ANDROID_PLATFORM)); } + /** + * returns the information type of the system state which is supported to read + * as like cpu, memory, network traffic, and battery. + * @return output - array like below + * [cpuinfo, batteryinfo, networkinfo, memoryinfo] + * + */ + public List getSupportedPerformanceDataTypes() { + return CommandExecutionHelper.execute(this, getSupportedPerformanceDataTypesCommand()); + } + + /** + * returns the resource usage information of the application. the resource is one of the system state + * which means cpu, memory, network traffic, and battery. + * + * @param packageName the package name of the application + * @param dataType the type of system state which wants to read. + * It should be one of the supported performance data types, + * the return value of the function "getSupportedPerformanceDataTypes" + * @param dataReadTimeout the number of attempts to read + * @return table of the performance data, The first line of the table represents the type of data. + * The remaining lines represent the values of the data. + * in case of battery info : [[power], [23]] + * in case of memory info : + * [[totalPrivateDirty, nativePrivateDirty, dalvikPrivateDirty, eglPrivateDirty, glPrivateDirty, + * totalPss, nativePss, dalvikPss, eglPss, glPss, nativeHeapAllocatedSize, nativeHeapSize], + * [18360, 8296, 6132, null, null, 42588, 8406, 7024, null, null, 26519, 10344]] + * in case of network info : + * [[bucketStart, activeTime, rxBytes, rxPackets, txBytes, txPackets, operations, bucketDuration,], + * [1478091600000, null, 1099075, 610947, 928, 114362, 769, 0, 3600000], + * [1478095200000, null, 1306300, 405997, 509, 46359, 370, 0, 3600000]] + * in case of network info : + * [[st, activeTime, rb, rp, tb, tp, op, bucketDuration], + * [1478088000, null, null, 32115296, 34291, 2956805, 25705, 0, 3600], + * [1478091600, null, null, 2714683, 11821, 1420564, 12650, 0, 3600], + * [1478095200, null, null, 10079213, 19962, 2487705, 20015, 0, 3600], + * [1478098800, null, null, 4444433, 10227, 1430356, 10493, 0, 3600]] + * in case of cpu info : [[user, kernel], [0.9, 1.3]] + * @throws if the performance data type is not supported, thows Error + */ + public List> getPerformanceData(String packageName, String dataType, int dataReadTimeout) { + return CommandExecutionHelper.execute(this, + getPerformanceDataCommand(packageName, dataType, dataReadTimeout)); + } + /** * This method is deprecated. It is going to be removed */ diff --git a/src/main/java/io/appium/java_client/android/AndroidMobileCommandHelper.java b/src/main/java/io/appium/java_client/android/AndroidMobileCommandHelper.java index 4684ad7c0..0c69beedd 100644 --- a/src/main/java/io/appium/java_client/android/AndroidMobileCommandHelper.java +++ b/src/main/java/io/appium/java_client/android/AndroidMobileCommandHelper.java @@ -26,6 +26,7 @@ import org.openqa.selenium.internal.HasIdentity; import java.util.AbstractMap; +import java.util.List; import java.util.Map; /** @@ -63,6 +64,55 @@ public class AndroidMobileCommandHelper extends MobileCommand { END_TEST_COVERAGE, prepareArguments(parameters, values)); } + /** + * returns the information type of the system state which is supported to read + * as like cpu, memory, network traffic, and battery. + * @return output - array like below + * [cpuinfo, batteryinfo, networkinfo, memoryinfo] + * + */ + public static Map.Entry> getSupportedPerformanceDataTypesCommand() { + return new AbstractMap.SimpleEntry<>( + GET_SUPPORTED_PERFORMANCE_DATA_TYPES, ImmutableMap.of()); + } + + /** + * returns the resource usage information of the application. the resource is one of the system state + * which means cpu, memory, network traffic, and battery. + * + * @param packageName the package name of the application + * @param dataType the type of system state which wants to read. + * It should be one of the supported performance data types, + * the return value of the function "getSupportedPerformanceDataTypes" + * @param dataReadTimeout the number of attempts to read + * @return table of the performance data, The first line of the table represents the type of data. + * The remaining lines represent the values of the data. + * in case of battery info : [[power], [23]] + * in case of memory info : + * [[totalPrivateDirty, nativePrivateDirty, dalvikPrivateDirty, eglPrivateDirty, glPrivateDirty, + * totalPss, nativePss, dalvikPss, eglPss, glPss, nativeHeapAllocatedSize, nativeHeapSize], + * [18360, 8296, 6132, null, null, 42588, 8406, 7024, null, null, 26519, 10344]] + * in case of network info : + * [[bucketStart, activeTime, rxBytes, rxPackets, txBytes, txPackets, operations, bucketDuration,], + * [1478091600000, null, 1099075, 610947, 928, 114362, 769, 0, 3600000], + * [1478095200000, null, 1306300, 405997, 509, 46359, 370, 0, 3600000]] + * in case of network info : + * [[st, activeTime, rb, rp, tb, tp, op, bucketDuration], + * [1478088000, null, null, 32115296, 34291, 2956805, 25705, 0, 3600], + * [1478091600, null, null, 2714683, 11821, 1420564, 12650, 0, 3600], + * [1478095200, null, null, 10079213, 19962, 2487705, 20015, 0, 3600], + * [1478098800, null, null, 4444433, 10227, 1430356, 10493, 0, 3600]] + * in case of cpu info : [[user, kernel], [0.9, 1.3]] + * @throws if the performance data type is not supported, thows Error + */ + public static Map.Entry> getPerformanceDataCommand( + String packageName, String dataType, int dataReadTimeout) { + String[] parameters = new String[] {"packageName", "dataType", "dataReadTimeout"}; + Object[] values = new Object[] {packageName, dataType, dataReadTimeout}; + return new AbstractMap.SimpleEntry<>( + GET_PERFORMANCE_DATA, prepareArguments(parameters, values)); + } + /** * This method forms a {@link java.util.Map} of parameters to * Retrieve the display density of the Android device. diff --git a/src/test/java/io/appium/java_client/android/AndroidDriverTest.java b/src/test/java/io/appium/java_client/android/AndroidDriverTest.java index 186bc6e47..2f40fd605 100644 --- a/src/test/java/io/appium/java_client/android/AndroidDriverTest.java +++ b/src/test/java/io/appium/java_client/android/AndroidDriverTest.java @@ -30,6 +30,7 @@ import java.io.File; import java.util.Map; +import java.util.List; public class AndroidDriverTest extends BaseAndroidTest { @@ -140,4 +141,33 @@ public class AndroidDriverTest extends BaseAndroidTest { assertNotNull(driver.getDisplayDensity()); assertNotEquals(0, driver.getSystemBars().size()); } + + @Test public void getSupportedPerformanceDataTypesTest() { + driver.startActivity("io.appium.android.apis", ".ApiDemos"); + + List supportedPerformanceDataTypes = driver.getSupportedPerformanceDataTypes(); + assert(supportedPerformanceDataTypes.size() == 4); + + } + + @Test public void getPerformanceDataTest() { + driver.startActivity("io.appium.android.apis", ".ApiDemos"); + + List supportedPerformanceDataTypes = driver.getSupportedPerformanceDataTypes(); + + for(int i = 0 ; i < supportedPerformanceDataTypes.size() ; ++ i){ + + String dataType = supportedPerformanceDataTypes.get(i); + + List> valueTable = driver.getPerformanceData("com.example.android.apis", dataType, 60000); + + int valueTableHeadLength = valueTable.get(0).size(); + + for(int j = 1 ; j < valueTable.size() ; ++ j){ + assert(valueTableHeadLength == valueTable.get(j).size()); + } + } + + } + } From 26d7c1d5e06faae390730f446e9dae4e6559a941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=99=A9=ED=9D=AC=EC=84=A0?= Date: Mon, 30 Jan 2017 22:15:03 +0900 Subject: [PATCH 02/16] fix the requirements for pullrequest --- .../java_client/android/AndroidDriver.java | 1 - .../android/AndroidMobileCommandHelper.java | 1 - .../android/AndroidDriverTest.java | 26 ++++++++++++++----- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/main/java/io/appium/java_client/android/AndroidDriver.java b/src/main/java/io/appium/java_client/android/AndroidDriver.java index 6f1d15fc7..b4149dbb1 100644 --- a/src/main/java/io/appium/java_client/android/AndroidDriver.java +++ b/src/main/java/io/appium/java_client/android/AndroidDriver.java @@ -33,7 +33,6 @@ import org.openqa.selenium.Capabilities; import org.openqa.selenium.WebElement; import org.openqa.selenium.remote.HttpCommandExecutor; -import org.openqa.selenium.remote.Response; import org.openqa.selenium.remote.http.HttpClient; import java.net.URL; diff --git a/src/main/java/io/appium/java_client/android/AndroidMobileCommandHelper.java b/src/main/java/io/appium/java_client/android/AndroidMobileCommandHelper.java index 0c69beedd..ae01cce50 100644 --- a/src/main/java/io/appium/java_client/android/AndroidMobileCommandHelper.java +++ b/src/main/java/io/appium/java_client/android/AndroidMobileCommandHelper.java @@ -26,7 +26,6 @@ import org.openqa.selenium.internal.HasIdentity; import java.util.AbstractMap; -import java.util.List; import java.util.Map; /** diff --git a/src/test/java/io/appium/java_client/android/AndroidDriverTest.java b/src/test/java/io/appium/java_client/android/AndroidDriverTest.java index 2f40fd605..f3542f08d 100644 --- a/src/test/java/io/appium/java_client/android/AndroidDriverTest.java +++ b/src/test/java/io/appium/java_client/android/AndroidDriverTest.java @@ -29,8 +29,10 @@ import org.openqa.selenium.html5.Location; import java.io.File; -import java.util.Map; +import java.util.ArrayList; import java.util.List; +import java.util.Map; + public class AndroidDriverTest extends BaseAndroidTest { @@ -145,8 +147,20 @@ public class AndroidDriverTest extends BaseAndroidTest { @Test public void getSupportedPerformanceDataTypesTest() { driver.startActivity("io.appium.android.apis", ".ApiDemos"); + List dataTypes = new ArrayList(); + dataTypes.add("cpuinfo"); + dataTypes.add("memoryinfo"); + dataTypes.add("batteryinfo"); + dataTypes.add("networkinfo"); + List supportedPerformanceDataTypes = driver.getSupportedPerformanceDataTypes(); - assert(supportedPerformanceDataTypes.size() == 4); + + assertEquals(4, supportedPerformanceDataTypes.size()); + + for ( int i = 0 ; i < supportedPerformanceDataTypes.size() ; ++i) { + assertEquals(dataTypes.get(i), supportedPerformanceDataTypes.get(i)); + } + } @@ -155,16 +169,14 @@ public class AndroidDriverTest extends BaseAndroidTest { List supportedPerformanceDataTypes = driver.getSupportedPerformanceDataTypes(); - for(int i = 0 ; i < supportedPerformanceDataTypes.size() ; ++ i){ + for (int i = 0 ; i < supportedPerformanceDataTypes.size() ; ++ i) { String dataType = supportedPerformanceDataTypes.get(i); List> valueTable = driver.getPerformanceData("com.example.android.apis", dataType, 60000); - int valueTableHeadLength = valueTable.get(0).size(); - - for(int j = 1 ; j < valueTable.size() ; ++ j){ - assert(valueTableHeadLength == valueTable.get(j).size()); + for ( int j = 1 ; j < valueTable.size() ; ++ j) { + assertEquals(valueTable.subList(0,0).size(), valueTable.subList(j, j).size()); } } From d5fcf6422c196de423da840db30012a279707d4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=99=A9=ED=9D=AC=EC=84=A0?= Date: Mon, 30 Jan 2017 22:36:56 +0900 Subject: [PATCH 03/16] fix the ci error --- .../java/io/appium/java_client/android/AndroidDriverTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/io/appium/java_client/android/AndroidDriverTest.java b/src/test/java/io/appium/java_client/android/AndroidDriverTest.java index f3542f08d..9ae72b96c 100644 --- a/src/test/java/io/appium/java_client/android/AndroidDriverTest.java +++ b/src/test/java/io/appium/java_client/android/AndroidDriverTest.java @@ -164,7 +164,7 @@ public class AndroidDriverTest extends BaseAndroidTest { } - @Test public void getPerformanceDataTest() { + @Test public void getPerformanceDataTest() throws Exception { driver.startActivity("io.appium.android.apis", ".ApiDemos"); List supportedPerformanceDataTypes = driver.getSupportedPerformanceDataTypes(); From c0f3f6234cbe2b15f5d22d8c6fd1fa2cca5218f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=99=A9=ED=9D=AC=EC=84=A0?= Date: Mon, 30 Jan 2017 23:04:47 +0900 Subject: [PATCH 04/16] fix the ci error --- .../java/io/appium/java_client/android/AndroidDriver.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/appium/java_client/android/AndroidDriver.java b/src/main/java/io/appium/java_client/android/AndroidDriver.java index b4149dbb1..9e1b9de06 100644 --- a/src/main/java/io/appium/java_client/android/AndroidDriver.java +++ b/src/main/java/io/appium/java_client/android/AndroidDriver.java @@ -193,9 +193,10 @@ public List getSupportedPerformanceDataTypes() { * [1478095200, null, null, 10079213, 19962, 2487705, 20015, 0, 3600], * [1478098800, null, null, 4444433, 10227, 1430356, 10493, 0, 3600]] * in case of cpu info : [[user, kernel], [0.9, 1.3]] - * @throws if the performance data type is not supported, thows Error + * @throws Exception if the performance data type is not supported, thows Error */ - public List> getPerformanceData(String packageName, String dataType, int dataReadTimeout) { + public List> getPerformanceData(String packageName, String dataType, int dataReadTimeout) + throws Exception { return CommandExecutionHelper.execute(this, getPerformanceDataCommand(packageName, dataType, dataReadTimeout)); } From dd7885f105f53a32c0454cb3288022c4fbc7abaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=99=A9=ED=9D=AC=EC=84=A0?= Date: Mon, 30 Jan 2017 23:25:07 +0900 Subject: [PATCH 05/16] fix the ci error --- .../java_client/android/AndroidMobileCommandHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/appium/java_client/android/AndroidMobileCommandHelper.java b/src/main/java/io/appium/java_client/android/AndroidMobileCommandHelper.java index ae01cce50..55eae2f9d 100644 --- a/src/main/java/io/appium/java_client/android/AndroidMobileCommandHelper.java +++ b/src/main/java/io/appium/java_client/android/AndroidMobileCommandHelper.java @@ -102,10 +102,10 @@ public class AndroidMobileCommandHelper extends MobileCommand { * [1478095200, null, null, 10079213, 19962, 2487705, 20015, 0, 3600], * [1478098800, null, null, 4444433, 10227, 1430356, 10493, 0, 3600]] * in case of cpu info : [[user, kernel], [0.9, 1.3]] - * @throws if the performance data type is not supported, thows Error + * @throws Exception if the performance data type is not supported, thows Error */ public static Map.Entry> getPerformanceDataCommand( - String packageName, String dataType, int dataReadTimeout) { + String packageName, String dataType, int dataReadTimeout) throws Exception { String[] parameters = new String[] {"packageName", "dataType", "dataReadTimeout"}; Object[] values = new Object[] {packageName, dataType, dataReadTimeout}; return new AbstractMap.SimpleEntry<>( From be76b26837ef9b163a4652ae61b37d653839dcf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=99=A9=ED=9D=AC=EC=84=A0?= Date: Thu, 2 Feb 2017 21:17:13 +0900 Subject: [PATCH 06/16] define interface to read performance data --- .../java_client/android/AndroidDriver.java | 3 ++- .../HasSupportedPerformanceDataType.java | 24 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 src/main/java/io/appium/java_client/android/HasSupportedPerformanceDataType.java diff --git a/src/main/java/io/appium/java_client/android/AndroidDriver.java b/src/main/java/io/appium/java_client/android/AndroidDriver.java index 9e1b9de06..e14c89189 100644 --- a/src/main/java/io/appium/java_client/android/AndroidDriver.java +++ b/src/main/java/io/appium/java_client/android/AndroidDriver.java @@ -50,7 +50,8 @@ public class AndroidDriver extends AppiumDriver implements PressesKeyCode, HasNetworkConnection, PushesFiles, StartsActivity, - FindsByAndroidUIAutomator, LocksAndroidDevice, HasSettings, HasDeviceDetails { + FindsByAndroidUIAutomator, LocksAndroidDevice, HasSettings, HasDeviceDetails, + HasSupportedPerformanceDataType { private static final String ANDROID_PLATFORM = MobilePlatform.ANDROID; diff --git a/src/main/java/io/appium/java_client/android/HasSupportedPerformanceDataType.java b/src/main/java/io/appium/java_client/android/HasSupportedPerformanceDataType.java new file mode 100644 index 000000000..b1178ff24 --- /dev/null +++ b/src/main/java/io/appium/java_client/android/HasSupportedPerformanceDataType.java @@ -0,0 +1,24 @@ +package io.appium.java_client.android; + +import static io.appium.java_client.android.AndroidMobileCommandHelper.getPerformanceDataCommand; +import static io.appium.java_client.android.AndroidMobileCommandHelper.getSupportedPerformanceDataTypesCommand; + +import io.appium.java_client.CommandExecutionHelper; +import io.appium.java_client.ExecutesMethod; + +import java.util.List; + +/** + * Created by hwangheeseon on 2017. 2. 2.. + */ +public interface HasSupportedPerformanceDataType extends ExecutesMethod { + default List getSupportedPerformanceDataTypes() { + return CommandExecutionHelper.execute(this, getSupportedPerformanceDataTypesCommand()); + } + + default List> getPerformanceData(String packageName, String dataType, int dataReadTimeout) + throws Exception { + return CommandExecutionHelper.execute(this, + getPerformanceDataCommand(packageName, dataType, dataReadTimeout)); + } +} From e0ab11fe1d823fcb2023a8475b4878f1a9944c15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=99=A9=ED=9D=AC=EC=84=A0?= Date: Sat, 25 Feb 2017 00:10:24 +0900 Subject: [PATCH 07/16] delete the duplicated code --- .../java_client/android/AndroidDriver.java | 46 ------------------- .../HasSupportedPerformanceDataType.java | 37 +++++++++++++++ 2 files changed, 37 insertions(+), 46 deletions(-) diff --git a/src/main/java/io/appium/java_client/android/AndroidDriver.java b/src/main/java/io/appium/java_client/android/AndroidDriver.java index e14c89189..0643bc671 100644 --- a/src/main/java/io/appium/java_client/android/AndroidDriver.java +++ b/src/main/java/io/appium/java_client/android/AndroidDriver.java @@ -156,52 +156,6 @@ public AndroidDriver(Capabilities desiredCapabilities) { super(substituteMobilePlatform(desiredCapabilities, ANDROID_PLATFORM)); } - /** - * returns the information type of the system state which is supported to read - * as like cpu, memory, network traffic, and battery. - * @return output - array like below - * [cpuinfo, batteryinfo, networkinfo, memoryinfo] - * - */ - public List getSupportedPerformanceDataTypes() { - return CommandExecutionHelper.execute(this, getSupportedPerformanceDataTypesCommand()); - } - - /** - * returns the resource usage information of the application. the resource is one of the system state - * which means cpu, memory, network traffic, and battery. - * - * @param packageName the package name of the application - * @param dataType the type of system state which wants to read. - * It should be one of the supported performance data types, - * the return value of the function "getSupportedPerformanceDataTypes" - * @param dataReadTimeout the number of attempts to read - * @return table of the performance data, The first line of the table represents the type of data. - * The remaining lines represent the values of the data. - * in case of battery info : [[power], [23]] - * in case of memory info : - * [[totalPrivateDirty, nativePrivateDirty, dalvikPrivateDirty, eglPrivateDirty, glPrivateDirty, - * totalPss, nativePss, dalvikPss, eglPss, glPss, nativeHeapAllocatedSize, nativeHeapSize], - * [18360, 8296, 6132, null, null, 42588, 8406, 7024, null, null, 26519, 10344]] - * in case of network info : - * [[bucketStart, activeTime, rxBytes, rxPackets, txBytes, txPackets, operations, bucketDuration,], - * [1478091600000, null, 1099075, 610947, 928, 114362, 769, 0, 3600000], - * [1478095200000, null, 1306300, 405997, 509, 46359, 370, 0, 3600000]] - * in case of network info : - * [[st, activeTime, rb, rp, tb, tp, op, bucketDuration], - * [1478088000, null, null, 32115296, 34291, 2956805, 25705, 0, 3600], - * [1478091600, null, null, 2714683, 11821, 1420564, 12650, 0, 3600], - * [1478095200, null, null, 10079213, 19962, 2487705, 20015, 0, 3600], - * [1478098800, null, null, 4444433, 10227, 1430356, 10493, 0, 3600]] - * in case of cpu info : [[user, kernel], [0.9, 1.3]] - * @throws Exception if the performance data type is not supported, thows Error - */ - public List> getPerformanceData(String packageName, String dataType, int dataReadTimeout) - throws Exception { - return CommandExecutionHelper.execute(this, - getPerformanceDataCommand(packageName, dataType, dataReadTimeout)); - } - /** * This method is deprecated. It is going to be removed */ diff --git a/src/main/java/io/appium/java_client/android/HasSupportedPerformanceDataType.java b/src/main/java/io/appium/java_client/android/HasSupportedPerformanceDataType.java index b1178ff24..4f38614eb 100644 --- a/src/main/java/io/appium/java_client/android/HasSupportedPerformanceDataType.java +++ b/src/main/java/io/appium/java_client/android/HasSupportedPerformanceDataType.java @@ -12,10 +12,47 @@ * Created by hwangheeseon on 2017. 2. 2.. */ public interface HasSupportedPerformanceDataType extends ExecutesMethod { + + /** + * returns the information type of the system state which is supported to read + * as like cpu, memory, network traffic, and battery. + * @return output - array like below + * [cpuinfo, batteryinfo, networkinfo, memoryinfo] + * + */ default List getSupportedPerformanceDataTypes() { return CommandExecutionHelper.execute(this, getSupportedPerformanceDataTypesCommand()); } + /** + * returns the resource usage information of the application. the resource is one of the system state + * which means cpu, memory, network traffic, and battery. + * + * @param packageName the package name of the application + * @param dataType the type of system state which wants to read. + * It should be one of the supported performance data types, + * the return value of the function "getSupportedPerformanceDataTypes" + * @param dataReadTimeout the number of attempts to read + * @return table of the performance data, The first line of the table represents the type of data. + * The remaining lines represent the values of the data. + * in case of battery info : [[power], [23]] + * in case of memory info : + * [[totalPrivateDirty, nativePrivateDirty, dalvikPrivateDirty, eglPrivateDirty, glPrivateDirty, + * totalPss, nativePss, dalvikPss, eglPss, glPss, nativeHeapAllocatedSize, nativeHeapSize], + * [18360, 8296, 6132, null, null, 42588, 8406, 7024, null, null, 26519, 10344]] + * in case of network info : + * [[bucketStart, activeTime, rxBytes, rxPackets, txBytes, txPackets, operations, bucketDuration,], + * [1478091600000, null, 1099075, 610947, 928, 114362, 769, 0, 3600000], + * [1478095200000, null, 1306300, 405997, 509, 46359, 370, 0, 3600000]] + * in case of network info : + * [[st, activeTime, rb, rp, tb, tp, op, bucketDuration], + * [1478088000, null, null, 32115296, 34291, 2956805, 25705, 0, 3600], + * [1478091600, null, null, 2714683, 11821, 1420564, 12650, 0, 3600], + * [1478095200, null, null, 10079213, 19962, 2487705, 20015, 0, 3600], + * [1478098800, null, null, 4444433, 10227, 1430356, 10493, 0, 3600]] + * in case of cpu info : [[user, kernel], [0.9, 1.3]] + * @throws Exception if the performance data type is not supported, thows Error + */ default List> getPerformanceData(String packageName, String dataType, int dataReadTimeout) throws Exception { return CommandExecutionHelper.execute(this, From 669f0a81b0c5365b4ade7e055d46af371c34eef8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=99=A9=ED=9D=AC=EC=84=A0?= Date: Sat, 25 Feb 2017 08:17:54 +0900 Subject: [PATCH 08/16] delete the unused import --- src/main/java/io/appium/java_client/android/AndroidDriver.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/java/io/appium/java_client/android/AndroidDriver.java b/src/main/java/io/appium/java_client/android/AndroidDriver.java index 0643bc671..0b8b8497f 100644 --- a/src/main/java/io/appium/java_client/android/AndroidDriver.java +++ b/src/main/java/io/appium/java_client/android/AndroidDriver.java @@ -17,8 +17,6 @@ package io.appium.java_client.android; import static io.appium.java_client.android.AndroidMobileCommandHelper.endTestCoverageCommand; -import static io.appium.java_client.android.AndroidMobileCommandHelper.getPerformanceDataCommand; -import static io.appium.java_client.android.AndroidMobileCommandHelper.getSupportedPerformanceDataTypesCommand; import static io.appium.java_client.android.AndroidMobileCommandHelper.openNotificationsCommand; import static io.appium.java_client.android.AndroidMobileCommandHelper.toggleLocationServicesCommand; @@ -36,7 +34,6 @@ import org.openqa.selenium.remote.http.HttpClient; import java.net.URL; -import java.util.List; /** * @param the required type of class which implement {@link org.openqa.selenium.WebElement}. From fb890a9dc726cf68bba6ef5ab1ae06aba6aaaeb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=99=A9=ED=9D=AC=EC=84=A0?= Date: Sun, 26 Feb 2017 00:21:32 +0900 Subject: [PATCH 09/16] delete the private comment --- .../java_client/android/HasSupportedPerformanceDataType.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/appium/java_client/android/HasSupportedPerformanceDataType.java b/src/main/java/io/appium/java_client/android/HasSupportedPerformanceDataType.java index 4f38614eb..e9004daf9 100644 --- a/src/main/java/io/appium/java_client/android/HasSupportedPerformanceDataType.java +++ b/src/main/java/io/appium/java_client/android/HasSupportedPerformanceDataType.java @@ -9,7 +9,7 @@ import java.util.List; /** - * Created by hwangheeseon on 2017. 2. 2.. + * */ public interface HasSupportedPerformanceDataType extends ExecutesMethod { From 477e5cb89a041bcb7d4bd798cb0bb5135c870cac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=99=A9=ED=9D=AC=EC=84=A0?= Date: Mon, 20 Mar 2017 22:30:44 +0900 Subject: [PATCH 10/16] add apis for recording the screen --- .../io/appium/java_client/MobileCommand.java | 9 +++ .../java_client/android/AndroidDriver.java | 2 +- .../android/AndroidMobileCommandHelper.java | 35 +++++++++ .../java_client/android/RecordScreen.java | 71 +++++++++++++++++++ 4 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 src/main/java/io/appium/java_client/android/RecordScreen.java diff --git a/src/main/java/io/appium/java_client/MobileCommand.java b/src/main/java/io/appium/java_client/MobileCommand.java index ed0a530fd..f4730136b 100644 --- a/src/main/java/io/appium/java_client/MobileCommand.java +++ b/src/main/java/io/appium/java_client/MobileCommand.java @@ -51,6 +51,9 @@ public class MobileCommand { protected static final String GET_PERFORMANCE_DATA; protected static final String GET_SUPPORTED_PERFORMANCE_DATA_TYPES; + protected static final String START_RECORDING_SCREEN; + protected static final String STOP_RECORDING_SCREEN; + protected static final String HIDE_KEYBOARD; protected static final String LOCK; @@ -98,6 +101,8 @@ public class MobileCommand { GET_PERFORMANCE_DATA = "getPerformanceData"; GET_SUPPORTED_PERFORMANCE_DATA_TYPES = "getSuppportedPerformanceDataTypes"; + START_RECORDING_SCREEN = "startRecordingScreen"; + STOP_RECORDING_SCREEN = "stopRecordingScreen"; HIDE_KEYBOARD = "hideKeyboard"; LOCK = "lock"; @@ -147,6 +152,10 @@ public class MobileCommand { postC("/session/:sessionId/appium/performanceData/types")); commandRepository.put(GET_PERFORMANCE_DATA, postC("/session/:sessionId/appium/getPerformanceData")); + commandRepository.put(START_RECORDING_SCREEN, + postC("/session/:sessionId/appium/startRecordingScreen")); + commandRepository.put(STOP_RECORDING_SCREEN, + postC("/session/:sessionId/appium/stopRecordingScreen")); //iOS commandRepository.put(SHAKE, postC("/session/:sessionId/appium/device/shake")); diff --git a/src/main/java/io/appium/java_client/android/AndroidDriver.java b/src/main/java/io/appium/java_client/android/AndroidDriver.java index 0b8b8497f..035012f21 100644 --- a/src/main/java/io/appium/java_client/android/AndroidDriver.java +++ b/src/main/java/io/appium/java_client/android/AndroidDriver.java @@ -48,7 +48,7 @@ public class AndroidDriver extends AppiumDriver implements PressesKeyCode, HasNetworkConnection, PushesFiles, StartsActivity, FindsByAndroidUIAutomator, LocksAndroidDevice, HasSettings, HasDeviceDetails, - HasSupportedPerformanceDataType { + HasSupportedPerformanceDataType, RecordScreen { private static final String ANDROID_PLATFORM = MobilePlatform.ANDROID; diff --git a/src/main/java/io/appium/java_client/android/AndroidMobileCommandHelper.java b/src/main/java/io/appium/java_client/android/AndroidMobileCommandHelper.java index 55eae2f9d..aebc43140 100644 --- a/src/main/java/io/appium/java_client/android/AndroidMobileCommandHelper.java +++ b/src/main/java/io/appium/java_client/android/AndroidMobileCommandHelper.java @@ -112,6 +112,41 @@ public class AndroidMobileCommandHelper extends MobileCommand { GET_PERFORMANCE_DATA, prepareArguments(parameters, values)); } + /** + * record the display of devices running Android 4.4 (API level 19) and higher. + * It records screen activity to an MPEG-4 file. Audio is not recorded with the video file. + * + * @param filePath the video file name + * for example, "/sdcard/demo.mp4" + * @param videoSize the format is widthxheight. + * The default value is the device's native display resolution (if supported), + * 1280x720 if not. For best results, + * use a size supported by your device's Advanced Video Coding (AVC) encoder. + * for example, "1280x720" + * @param timeLimit the maximum recording time, in seconds. The default and maximum value is 180 (3 minutes). + * @param bitRate the video bit rate for the video, in megabits per second. + * The default value is 4Mbps. You can increase the bit rate to improve video quality, + * but doing so results in larger movie files. + * for example, 6000000 + * + */ + public static Map.Entry> startRecordingScreenCommand( + String filePath, String videoSize, int timeLimit, int bitRate) throws Exception { + String[] parameters = new String[] {"filePath", "videoSize", "timeLimit", "bitRate"}; + Object[] values = new Object[] {filePath, videoSize, timeLimit, bitRate}; + + return new AbstractMap.SimpleEntry<>(START_RECORDING_SCREEN, prepareArguments(parameters, values)); + + } + + /** + * stop recording the screen. + */ + public static Map.Entry> stopRecordingScreenCommand() throws Exception { + return new AbstractMap.SimpleEntry<>(STOP_RECORDING_SCREEN, ImmutableMap.of()); + + } + /** * This method forms a {@link java.util.Map} of parameters to * Retrieve the display density of the Android device. diff --git a/src/main/java/io/appium/java_client/android/RecordScreen.java b/src/main/java/io/appium/java_client/android/RecordScreen.java new file mode 100644 index 000000000..57d6c013c --- /dev/null +++ b/src/main/java/io/appium/java_client/android/RecordScreen.java @@ -0,0 +1,71 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * See the NOTICE file distributed with this work for additional + * information regarding copyright ownership. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.appium.java_client.android; + +import static io.appium.java_client.android.AndroidMobileCommandHelper.startRecordingScreenCommand; +import static io.appium.java_client.android.AndroidMobileCommandHelper.stopRecordingScreenCommand; + +import io.appium.java_client.CommandExecutionHelper; +import io.appium.java_client.ExecutesMethod; + +public interface RecordScreen extends ExecutesMethod { + /** + * record the display of devices running Android 4.4 (API level 19) and higher. + * It records screen activity to an MPEG-4 file. Audio is not recorded with the video file. + * + * @param filePath the video file name + * for example, "/sdcard/demo.mp4" + * @param videoSize the format is widthxheight. + * if it is "default", the default value is the device's native display resolution (if supported), + * 1280x720 if not. For best results, + * use a size supported by your device's Advanced Video Coding (AVC) encoder. + * for example, "1280x720" + * @param timeLimit the maximum recording time, in seconds. if it is -1, + * the default and maximum value is 180 (3 minutes). + * @param bitRate the video bit rate for the video, in megabits per second. + * if it is -1, the default value is 4Mbps. You can increase the bit rate to improve video quality, + * but doing so results in larger movie files. + * for example, 6000000 + * + */ + default void startRecordingScreen(String filePath, String videoSize, int timeLimit, int bitRate) throws Exception { + CommandExecutionHelper.execute(this, startRecordingScreenCommand( filePath, videoSize, timeLimit, bitRate )); + } + + /** + * record the display of devices running Android 4.4 (API level 19) and higher. + * It records screen activity to an MPEG-4 file. Audio is not recorded with the video file. + * The video size has the default value which is the device's native display resolution (if supported). + * The maximum recording time has the default value which is 180 (3 minutes). + * The video bit rate has the default value which is 4Mbps. + * + * @param filePath the video file name + * for example, "/sdcard/demo.mp4" + * + */ + default void startRecordingScreen(String filePath) throws Exception { + CommandExecutionHelper.execute(this, startRecordingScreenCommand( filePath, "default", -1, -1 )); + } + + /** + * stop recording the screen. + */ + default void stopRecordingScreen() throws Exception { + CommandExecutionHelper.execute(this, stopRecordingScreenCommand()); + } + +} From 28418b65795938c708f63f5c7c323b32b8413c8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=92=E1=85=AA=E1=86=BC=E1=84=92=E1=85=B4=E1=84=89?= =?UTF-8?q?=E1=85=A5=E1=86=AB?= Date: Tue, 15 Aug 2017 23:35:52 +0900 Subject: [PATCH 11/16] add testcase and update doc --- .../android/AndroidMobileCommandHelper.java | 13 +++++-- .../java_client/android/RecordScreen.java | 7 ++++ .../android/AndroidDriverTest.java | 36 +++++++++++++++++++ 3 files changed, 53 insertions(+), 3 deletions(-) diff --git a/src/main/java/io/appium/java_client/android/AndroidMobileCommandHelper.java b/src/main/java/io/appium/java_client/android/AndroidMobileCommandHelper.java index aebc43140..d4f1d978e 100644 --- a/src/main/java/io/appium/java_client/android/AndroidMobileCommandHelper.java +++ b/src/main/java/io/appium/java_client/android/AndroidMobileCommandHelper.java @@ -128,10 +128,13 @@ public class AndroidMobileCommandHelper extends MobileCommand { * The default value is 4Mbps. You can increase the bit rate to improve video quality, * but doing so results in larger movie files. * for example, 6000000 - * + * @throws Exception if devices running is less than Android 4.4 (API level 19), or + * running is on emulator, + * thows Error */ public static Map.Entry> startRecordingScreenCommand( - String filePath, String videoSize, int timeLimit, int bitRate) throws Exception { + String filePath, String videoSize, int timeLimit, int bitRate) + throws Exception { String[] parameters = new String[] {"filePath", "videoSize", "timeLimit", "bitRate"}; Object[] values = new Object[] {filePath, videoSize, timeLimit, bitRate}; @@ -141,8 +144,12 @@ public class AndroidMobileCommandHelper extends MobileCommand { /** * stop recording the screen. + * @throws Exception if devices running is less than Android 4.4 (API level 19), or + * running is on emulator, + * thows Error */ - public static Map.Entry> stopRecordingScreenCommand() throws Exception { + public static Map.Entry> stopRecordingScreenCommand() + throws Exception { return new AbstractMap.SimpleEntry<>(STOP_RECORDING_SCREEN, ImmutableMap.of()); } diff --git a/src/main/java/io/appium/java_client/android/RecordScreen.java b/src/main/java/io/appium/java_client/android/RecordScreen.java index 57d6c013c..d2520828f 100644 --- a/src/main/java/io/appium/java_client/android/RecordScreen.java +++ b/src/main/java/io/appium/java_client/android/RecordScreen.java @@ -55,6 +55,9 @@ default void startRecordingScreen(String filePath, String videoSize, int timeLim * * @param filePath the video file name * for example, "/sdcard/demo.mp4" + * @throws Exception if devices running is less than Android 4.4 (API level 19), or + * running is on emulator, + * thows Error * */ default void startRecordingScreen(String filePath) throws Exception { @@ -63,6 +66,10 @@ default void startRecordingScreen(String filePath) throws Exception { /** * stop recording the screen. + * + * @throws Exception if devices running is less than Android 4.4 (API level 19), or + * running is on emulator, + * thows Error */ default void stopRecordingScreen() throws Exception { CommandExecutionHelper.execute(this, stopRecordingScreenCommand()); diff --git a/src/test/java/io/appium/java_client/android/AndroidDriverTest.java b/src/test/java/io/appium/java_client/android/AndroidDriverTest.java index 9ae72b96c..1f3f97732 100644 --- a/src/test/java/io/appium/java_client/android/AndroidDriverTest.java +++ b/src/test/java/io/appium/java_client/android/AndroidDriverTest.java @@ -182,4 +182,40 @@ public class AndroidDriverTest extends BaseAndroidTest { } + @Test public void getStartRecordingScreenTest() { + driver.startActivity("io.appium.android.apis", ".ApiDemos"); + + try { + driver.startRecordingScreen("/sdcard/demo123.mp4"); + assertTrue(false); + } catch (Exception e) { + assertTrue(true); + } + + try { + driver.stopRecordingScreen(); + assertTrue(false); + } catch (Exception e) { + assertTrue(true); + } + } + + @Test public void getStopRecordingScreenTest() { + driver.startActivity("io.appium.android.apis", ".ApiDemos"); + + try { + driver.startRecordingScreen("/sdcard/demo321.mp4"); + assertTrue(false); + } catch (Exception e) { + assertTrue(true); + } + + + try { + driver.stopRecordingScreen(); + } catch (Exception e) { + e.printStackTrace(); + } + + } } From 0bfc7a8e5c0587beaa7d16e44ede76af0a390de7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=92=E1=85=AA=E1=86=BC=E1=84=92=E1=85=B4=E1=84=89?= =?UTF-8?q?=E1=85=A5=E1=86=AB?= Date: Thu, 7 Sep 2017 20:10:24 +0900 Subject: [PATCH 12/16] fix the codacy-bot comment --- .../java/io/appium/java_client/android/AndroidDriverTest.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/test/java/io/appium/java_client/android/AndroidDriverTest.java b/src/test/java/io/appium/java_client/android/AndroidDriverTest.java index 1f3f97732..c295b73aa 100644 --- a/src/test/java/io/appium/java_client/android/AndroidDriverTest.java +++ b/src/test/java/io/appium/java_client/android/AndroidDriverTest.java @@ -189,14 +189,12 @@ public class AndroidDriverTest extends BaseAndroidTest { driver.startRecordingScreen("/sdcard/demo123.mp4"); assertTrue(false); } catch (Exception e) { - assertTrue(true); } try { driver.stopRecordingScreen(); assertTrue(false); } catch (Exception e) { - assertTrue(true); } } @@ -207,7 +205,6 @@ public class AndroidDriverTest extends BaseAndroidTest { driver.startRecordingScreen("/sdcard/demo321.mp4"); assertTrue(false); } catch (Exception e) { - assertTrue(true); } From 530826bc2f7f81ad9a136fdcbb812f76e6110f11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=92=E1=85=AA=E1=86=BC=E1=84=92=E1=85=B4=E1=84=89?= =?UTF-8?q?=E1=85=A5=E1=86=AB?= Date: Sun, 15 Oct 2017 22:25:51 +0900 Subject: [PATCH 13/16] Do not hardcode --- .../io/appium/java_client/android/AndroidDriverTest.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/test/java/io/appium/java_client/android/AndroidDriverTest.java b/src/test/java/io/appium/java_client/android/AndroidDriverTest.java index c295b73aa..042245895 100644 --- a/src/test/java/io/appium/java_client/android/AndroidDriverTest.java +++ b/src/test/java/io/appium/java_client/android/AndroidDriverTest.java @@ -185,8 +185,10 @@ public class AndroidDriverTest extends BaseAndroidTest { @Test public void getStartRecordingScreenTest() { driver.startActivity("io.appium.android.apis", ".ApiDemos"); + String filePath = "/sdcard/demo321.mp4"; + try { - driver.startRecordingScreen("/sdcard/demo123.mp4"); + driver.startRecordingScreen(filePath); assertTrue(false); } catch (Exception e) { } @@ -201,8 +203,10 @@ public class AndroidDriverTest extends BaseAndroidTest { @Test public void getStopRecordingScreenTest() { driver.startActivity("io.appium.android.apis", ".ApiDemos"); + String filePath = "/sdcard/demo321.mp4"; + try { - driver.startRecordingScreen("/sdcard/demo321.mp4"); + driver.startRecordingScreen(filePath); assertTrue(false); } catch (Exception e) { } From 19cb0202b035ca35418ac344f9a6c0740129dc2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=92=E1=85=AA=E1=86=BC=E1=84=92=E1=85=B4=E1=84=89?= =?UTF-8?q?=E1=85=A5=E1=86=AB?= Date: Sun, 15 Oct 2017 22:35:25 +0900 Subject: [PATCH 14/16] Do not hardcode --- .../java/io/appium/java_client/android/AndroidDriverTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/io/appium/java_client/android/AndroidDriverTest.java b/src/test/java/io/appium/java_client/android/AndroidDriverTest.java index b214c0fef..9e7f23a6b 100644 --- a/src/test/java/io/appium/java_client/android/AndroidDriverTest.java +++ b/src/test/java/io/appium/java_client/android/AndroidDriverTest.java @@ -183,7 +183,7 @@ public class AndroidDriverTest extends BaseAndroidTest { } @Test public void getStartRecordingScreenTest() { - driver.startActivity("io.appium.android.apis", ".ApiDemos"); + driver.startActivity(new Activity("io.appium.android.apis", ".ApiDemos")); String filePath = "/sdcard/demo321.mp4"; @@ -201,7 +201,7 @@ public class AndroidDriverTest extends BaseAndroidTest { } @Test public void getStopRecordingScreenTest() { - driver.startActivity("io.appium.android.apis", ".ApiDemos"); + driver.startActivity(new Activity("io.appium.android.apis", ".ApiDemos")); String filePath = "/sdcard/demo321.mp4"; From 9fb37db1b2b7ea0a756debf7fc5a841529059115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=92=E1=85=AA=E1=86=BC=E1=84=92=E1=85=B4=E1=84=89?= =?UTF-8?q?=E1=85=A5=E1=86=AB?= Date: Sun, 15 Oct 2017 23:08:35 +0900 Subject: [PATCH 15/16] build error --- archive/.gitignore | 1 + gradle/wrapper/gradle-wrapper.properties | 4 +- java-client.properties | 4 + java-client.xml | 346 ++++++++++++++++++ ...nt_Sat_Jan_28_12-54-25_KST_2017.properties | 4 + java-client_Sat_Jan_28_12-54-25_KST_2017.xml | 345 +++++++++++++++++ module_java-client.xml | 330 +++++++++++++++++ .../HasSupportedPerformanceDataType.java | 3 - 8 files changed, 1032 insertions(+), 5 deletions(-) create mode 100644 archive/.gitignore create mode 100644 java-client.properties create mode 100644 java-client.xml create mode 100644 java-client_Sat_Jan_28_12-54-25_KST_2017.properties create mode 100644 java-client_Sat_Jan_28_12-54-25_KST_2017.xml create mode 100644 module_java-client.xml diff --git a/archive/.gitignore b/archive/.gitignore new file mode 100644 index 000000000..b83d22266 --- /dev/null +++ b/archive/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 13c1c1002..f4e292a8c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sat Jul 23 20:09:50 IST 2016 +#Sat Jan 28 15:49:01 KST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip diff --git a/java-client.properties b/java-client.properties new file mode 100644 index 000000000..c09dec9e2 --- /dev/null +++ b/java-client.properties @@ -0,0 +1,4 @@ +path.variable.kotlin_bundled=/Applications/IntelliJ IDEA.app/Contents/plugins/Kotlin/kotlinc +path.variable.maven_repository=/Users/hwangheeseon/.m2/repository +jdk.home.1.8=/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home +javac2.instrumentation.includeJavaRuntime=false \ No newline at end of file diff --git a/java-client.xml b/java-client.xml new file mode 100644 index 000000000..9138cc54e --- /dev/null +++ b/java-client.xml @@ -0,0 +1,346 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/java-client_Sat_Jan_28_12-54-25_KST_2017.properties b/java-client_Sat_Jan_28_12-54-25_KST_2017.properties new file mode 100644 index 000000000..965416a87 --- /dev/null +++ b/java-client_Sat_Jan_28_12-54-25_KST_2017.properties @@ -0,0 +1,4 @@ +path.variable.kotlin_bundled=/Applications/IntelliJ IDEA 15.app/Contents/plugins/Kotlin/kotlinc +path.variable.maven_repository=/Users/hwangheeseon/.m2/repository +jdk.home.1.8=/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home +javac2.instrumentation.includeJavaRuntime=false \ No newline at end of file diff --git a/java-client_Sat_Jan_28_12-54-25_KST_2017.xml b/java-client_Sat_Jan_28_12-54-25_KST_2017.xml new file mode 100644 index 000000000..b505aab21 --- /dev/null +++ b/java-client_Sat_Jan_28_12-54-25_KST_2017.xml @@ -0,0 +1,345 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/module_java-client.xml b/module_java-client.xml new file mode 100644 index 000000000..db37eec00 --- /dev/null +++ b/module_java-client.xml @@ -0,0 +1,330 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/io/appium/java_client/android/HasSupportedPerformanceDataType.java b/src/main/java/io/appium/java_client/android/HasSupportedPerformanceDataType.java index e9004daf9..e747acecc 100644 --- a/src/main/java/io/appium/java_client/android/HasSupportedPerformanceDataType.java +++ b/src/main/java/io/appium/java_client/android/HasSupportedPerformanceDataType.java @@ -8,9 +8,6 @@ import java.util.List; -/** - * - */ public interface HasSupportedPerformanceDataType extends ExecutesMethod { /** From b163ac51cbd21681552a521075f9641df37b22a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=92=E1=85=AA=E1=86=BC=E1=84=92=E1=85=B4=E1=84=89?= =?UTF-8?q?=E1=85=A5=E1=86=AB?= Date: Sun, 15 Oct 2017 23:33:14 +0900 Subject: [PATCH 16/16] rollback --- archive/.gitignore | 1 + java-client.properties | 4 + java-client.xml | 346 ++++++++++++++++++ ...nt_Sat_Jan_28_12-54-25_KST_2017.properties | 4 + java-client_Sat_Jan_28_12-54-25_KST_2017.xml | 345 +++++++++++++++++ module_java-client.xml | 330 +++++++++++++++++ 6 files changed, 1030 insertions(+) create mode 100644 archive/.gitignore create mode 100644 java-client.properties create mode 100644 java-client.xml create mode 100644 java-client_Sat_Jan_28_12-54-25_KST_2017.properties create mode 100644 java-client_Sat_Jan_28_12-54-25_KST_2017.xml create mode 100644 module_java-client.xml diff --git a/archive/.gitignore b/archive/.gitignore new file mode 100644 index 000000000..b83d22266 --- /dev/null +++ b/archive/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/java-client.properties b/java-client.properties new file mode 100644 index 000000000..c09dec9e2 --- /dev/null +++ b/java-client.properties @@ -0,0 +1,4 @@ +path.variable.kotlin_bundled=/Applications/IntelliJ IDEA.app/Contents/plugins/Kotlin/kotlinc +path.variable.maven_repository=/Users/hwangheeseon/.m2/repository +jdk.home.1.8=/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home +javac2.instrumentation.includeJavaRuntime=false \ No newline at end of file diff --git a/java-client.xml b/java-client.xml new file mode 100644 index 000000000..9138cc54e --- /dev/null +++ b/java-client.xml @@ -0,0 +1,346 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/java-client_Sat_Jan_28_12-54-25_KST_2017.properties b/java-client_Sat_Jan_28_12-54-25_KST_2017.properties new file mode 100644 index 000000000..965416a87 --- /dev/null +++ b/java-client_Sat_Jan_28_12-54-25_KST_2017.properties @@ -0,0 +1,4 @@ +path.variable.kotlin_bundled=/Applications/IntelliJ IDEA 15.app/Contents/plugins/Kotlin/kotlinc +path.variable.maven_repository=/Users/hwangheeseon/.m2/repository +jdk.home.1.8=/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home +javac2.instrumentation.includeJavaRuntime=false \ No newline at end of file diff --git a/java-client_Sat_Jan_28_12-54-25_KST_2017.xml b/java-client_Sat_Jan_28_12-54-25_KST_2017.xml new file mode 100644 index 000000000..b505aab21 --- /dev/null +++ b/java-client_Sat_Jan_28_12-54-25_KST_2017.xml @@ -0,0 +1,345 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/module_java-client.xml b/module_java-client.xml new file mode 100644 index 000000000..db37eec00 --- /dev/null +++ b/module_java-client.xml @@ -0,0 +1,330 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file