diff --git a/iot-e2e-tests/android/.gitignore b/iot-e2e-tests/android/.gitignore
new file mode 100644
index 0000000000..aa724b7707
--- /dev/null
+++ b/iot-e2e-tests/android/.gitignore
@@ -0,0 +1,15 @@
+*.iml
+.gradle
+/local.properties
+/.idea/caches
+/.idea/libraries
+/.idea/modules.xml
+/.idea/workspace.xml
+/.idea/navEditor.xml
+/.idea/assetWizardSettings.xml
+.DS_Store
+/build
+/captures
+.externalNativeBuild
+.cxx
+local.properties
diff --git a/iot-e2e-tests/android/AndroidDeviceSelect.py b/iot-e2e-tests/android/AndroidDeviceSelect.py
deleted file mode 100644
index 7089b6c016..0000000000
--- a/iot-e2e-tests/android/AndroidDeviceSelect.py
+++ /dev/null
@@ -1,34 +0,0 @@
-import os
-import time
-import re
-
-def setTarget(deviceName):
- #os.popen("echo " + deviceName + ">device_udid.txt").read()
- os.popen("setx ANDROID_DEVICE_NAME "+deviceName).read()
-
-def getDeviceList():
- res = os.popen("adb devices").read()
- formatted_string = res.strip().split('\n')
- deviceList = []
- for x in formatted_string:
- if "\tdevice" in x:
- deviceList.append(x)
- print (deviceList)
- return deviceList
-
-def killAvd():
- hasRealDevice = False
- deviceList = getDeviceList()
- print("Getting connected Devices")
- for device in deviceList:
- if not device.startswith('emulator'):
- hasRealDevice = True
- print("found real device "+device)
- device = re.sub('\tdevice$', '', device)
- setTarget(device)
- break
- if not hasRealDevice:
- print("no real android device found")
-
-print("selecting android device")
-killAvd()
\ No newline at end of file
diff --git a/iot-e2e-tests/android/app/.gitignore b/iot-e2e-tests/android/app/.gitignore
new file mode 100644
index 0000000000..42afabfd2a
--- /dev/null
+++ b/iot-e2e-tests/android/app/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/iot-e2e-tests/android/app/build.gradle b/iot-e2e-tests/android/app/build.gradle
index 7451d2fc8f..5950fe4151 100644
--- a/iot-e2e-tests/android/app/build.gradle
+++ b/iot-e2e-tests/android/app/build.gradle
@@ -1,4 +1,6 @@
-apply plugin: 'com.android.application'
+plugins {
+ alias(libs.plugins.android.application)
+}
//***********************************************************************************************//
def IOTHUB_CONNECTION_STRING_ENV_VAR_NAME = project.hasProperty('IOTHUB_CONNECTION_STRING') ? '"'+project.property('IOTHUB_CONNECTION_STRING')+'"' : '""'
@@ -13,68 +15,45 @@ def RECYCLE_TEST_IDENTITIES = project.hasProperty('RECYCLE_TEST_IDENTITIES') ? '
def STRING='String'
//***********************************************************************************************//
-android {
- compileSdkVersion 28
+android.buildFeatures.buildConfig = true
+android {
+ namespace 'com.microsoft.azure.sdk.iot.androidtest'
+ compileSdk {
+ version = release(36)
+ }
+
defaultConfig {
- javaCompileOptions.annotationProcessorOptions.includeCompileClasspath true
- applicationId "com.iothub.azure.microsoft.com.androide2e"
- minSdkVersion 24
- targetSdkVersion 28
+ applicationId "com.microsoft.azure.sdk.iot.androidtest"
+ minSdkVersion 26
+ targetSdk 28
multiDexEnabled true
versionCode 1
versionName "1.0"
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
- //********** We can define variables here **********
- each {
- //buildTypes.mBuildConfigFields 'DATATYPE','VARIABLE',|"GRADLE VARIABLE|"'
- buildConfigField STRING, 'IOTHUB_CONNECTION_STRING', IOTHUB_CONNECTION_STRING_ENV_VAR_NAME
- buildConfigField STRING, 'IOT_DPS_CONNECTION_STRING', IOT_DPS_CONNECTION_STRING
- buildConfigField STRING, 'DPS_GLOBALDEVICEENDPOINT_INVALIDCERT', INVALID_DEVICE_PROVISIONING_SERVICE_GLOBAL_ENDPOINT
- buildConfigField STRING, 'PROVISIONING_CONNECTION_STRING_INVALIDCERT', INVALID_DEVICE_PROVISIONING_SERVICE_CONNECTION_STRING
- buildConfigField STRING, 'IOT_DPS_ID_SCOPE', DEVICE_PROVISIONING_SERVICE_ID_SCOPE
- buildConfigField STRING, 'IS_BASIC_TIER_HUB', IS_BASIC_TIER_HUB
- buildConfigField STRING, 'IS_PULL_REQUEST', IS_PULL_REQUEST
- buildConfigField STRING, 'RECYCLE_TEST_IDENTITIES', RECYCLE_TEST_IDENTITIES
- }
+ buildConfigField STRING, 'IOTHUB_CONNECTION_STRING', IOTHUB_CONNECTION_STRING_ENV_VAR_NAME
+ buildConfigField STRING, 'IOT_DPS_CONNECTION_STRING', IOT_DPS_CONNECTION_STRING
+ //buildConfigField STRING, 'DPS_GLOBALDEVICEENDPOINT_INVALIDCERT', INVALID_DEVICE_PROVISIONING_SERVICE_GLOBAL_ENDPOINT
+ //buildConfigField STRING, 'PROVISIONING_CONNECTION_STRING_INVALIDCERT', INVALID_DEVICE_PROVISIONING_SERVICE_CONNECTION_STRING
+ buildConfigField STRING, 'IOT_DPS_ID_SCOPE', DEVICE_PROVISIONING_SERVICE_ID_SCOPE
+ buildConfigField STRING, 'IS_BASIC_TIER_HUB', IS_BASIC_TIER_HUB
+ buildConfigField STRING, 'IS_PULL_REQUEST', IS_PULL_REQUEST
+ buildConfigField STRING, 'RECYCLE_TEST_IDENTITIES', RECYCLE_TEST_IDENTITIES
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
+
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
- debug {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
}
-
- packagingOptions {
- exclude "META-INF/*.SF"
- exclude "META-INF/*.DSA"
- exclude "META-INF/*.RSA"
- exclude 'META-INF/DEPENDENCIES'
- exclude 'META-INF/NOTICE'
- exclude 'META-INF/LICENSE'
- exclude 'META-INF/LICENSE.txt'
- exclude 'META-INF/NOTICE.txt'
- exclude 'thirdpartynotice.txt'
- }
-
compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
-
- lintOptions{
- ignore 'InvalidPackage'
+ sourceCompatibility JavaVersion.VERSION_11
+ targetCompatibility JavaVersion.VERSION_11
}
}
dependencies {
- implementation fileTree(include: ['*.jar'], dir: 'libs')
- implementation 'com.android.support:appcompat-v7:28.0.0'
- implementation 'com.android.support:multidex:1.0.3'
// This jar contains the test code that will be run on android. This jar isn't in the m2 folder, but rather it is in this cloned repo after mvn install is run
implementation files('../../common/target/iot-e2e-common-1.0.0-tests.jar')
@@ -84,13 +63,18 @@ dependencies {
implementation ('org.apache.commons:commons-lang3:3.6')
implementation ('javax.xml.stream:stax-api:1.0-2')
-
- androidTestImplementation 'com.android.support:support-annotations:27.1.1'
- androidTestImplementation 'com.android.support.test:runner:1.0.2'
- androidTestImplementation 'junit:junit:4.12'
+
+ androidTestImplementation libs.runner
+ implementation libs.appcompat
+ implementation libs.material
+ testImplementation libs.junit
+ androidTestImplementation libs.ext.junit
+ androidTestImplementation libs.espresso.core
}
repositories {
- mavenLocal()
+ google()
mavenCentral()
+ gradlePluginPortal()
+ mavenLocal()
}
\ No newline at end of file
diff --git a/iot-e2e-tests/android/app/proguard-rules.pro b/iot-e2e-tests/android/app/proguard-rules.pro
index 6947b3de18..481bb43481 100644
--- a/iot-e2e-tests/android/app/proguard-rules.pro
+++ b/iot-e2e-tests/android/app/proguard-rules.pro
@@ -1,14 +1,10 @@
# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in C:\Users\v-askhur.REDMOND\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the proguardFiles
-# directive in build.gradle.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
-# Add any project specific keep options here:
-
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
@@ -16,16 +12,10 @@
# public *;
#}
-# JSON parser classes don't mix well with minification because JSON parser classes use reflection
-# based on the name of the field to create the JSON, and minification changes those names. As a result
-# all the message payload serializing and deserializing breaks. These lines explicitly exclude
-# the packages where we keep our JSON parsing classes from minification to avoid this issue
--keep class com.microsoft.azure.sdk.iot.provisioning.device.internal.parser.* { *; }
--keep class com.microsoft.azure.sdk.iot.deps.serializer.* { *; }
--keep class com.microsoft.azure.sdk.iot.provisioning.service.configs.* { *; }
--keep class com.microsoft.azure.sdk.iot.deps.twin.* { *; }
--keep class com.microsoft.azure.sdk.iot.service.registry.ImportMode { *; }
--keep class com.microsoft.azure.sdk.iot.service.AuthenticationMechanism { *; }
--keep class com.microsoft.azure.sdk.iot.device.edge.MethodRequest { *; }
--keep class com.microsoft.azure.sdk.iot.device.hsm.parser.ErrorResponse { *; }
--keep class com.microsoft.azure.sdk.iot.device.hsm.parser.SignRequest { *; }
\ No newline at end of file
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
\ No newline at end of file
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup10.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup10.java
deleted file mode 100644
index 21324651a7..0000000000
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup10.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Copyright (c) Microsoft. All rights reserved.
- * Licensed under the MIT license. See LICENSE file in the project root for full license information.
- */
-
-package com.microsoft.azure.sdk.iot.android.helper;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target({ElementType.METHOD, ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface TestGroup10
-{
-}
\ No newline at end of file
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup11.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup11.java
deleted file mode 100644
index 1fb43af7c5..0000000000
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup11.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Copyright (c) Microsoft. All rights reserved.
- * Licensed under the MIT license. See LICENSE file in the project root for full license information.
- */
-
-package com.microsoft.azure.sdk.iot.android.helper;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target({ElementType.METHOD, ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface TestGroup11
-{
-}
\ No newline at end of file
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup12.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup12.java
deleted file mode 100644
index 80f22a7c41..0000000000
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup12.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Copyright (c) Microsoft. All rights reserved.
- * Licensed under the MIT license. See LICENSE file in the project root for full license information.
- */
-
-package com.microsoft.azure.sdk.iot.android.helper;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target({ElementType.METHOD, ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface TestGroup12
-{
-}
\ No newline at end of file
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/FileUploadAndroidRunner.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/FileUploadAndroidRunner.java
similarity index 86%
rename from iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/FileUploadAndroidRunner.java
rename to iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/FileUploadAndroidRunner.java
index 5aa573b410..215c2a650c 100644
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/FileUploadAndroidRunner.java
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/FileUploadAndroidRunner.java
@@ -3,9 +3,9 @@
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
-package com.microsoft.azure.sdk.iot.android.iothub;
+package com.microsoft.azure.sdk.iot.androidtest.iothub;
-import com.microsoft.azure.sdk.iot.android.helper.TestGroup10;
+import com.microsoft.azure.sdk.iot.androidtest.testgroup.*;
import com.microsoft.azure.sdk.iot.device.IotHubClientProtocol;
import com.microsoft.azure.sdk.iot.service.auth.AuthenticationType;
import org.junit.runner.RunWith;
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/MultiplexingClientAndroidRunner.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/MultiplexingClientAndroidRunner.java
similarity index 93%
rename from iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/MultiplexingClientAndroidRunner.java
rename to iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/MultiplexingClientAndroidRunner.java
index f1ecf35ad9..3442c6df91 100644
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/MultiplexingClientAndroidRunner.java
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/MultiplexingClientAndroidRunner.java
@@ -3,9 +3,9 @@
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
-package com.microsoft.azure.sdk.iot.android.iothub;
+package com.microsoft.azure.sdk.iot.androidtest.iothub;
-import com.microsoft.azure.sdk.iot.android.helper.TestGroup6;
+import com.microsoft.azure.sdk.iot.androidtest.testgroup.*;
import com.microsoft.azure.sdk.iot.device.IotHubClientProtocol;
import org.junit.Ignore;
import org.junit.runner.RunWith;
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/TokenRenewalAndroidRunner.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/TokenRenewalAndroidRunner.java
similarity index 73%
rename from iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/TokenRenewalAndroidRunner.java
rename to iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/TokenRenewalAndroidRunner.java
index 881ed8cb4d..c0831a85db 100644
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/TokenRenewalAndroidRunner.java
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/TokenRenewalAndroidRunner.java
@@ -3,9 +3,9 @@
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
-package com.microsoft.azure.sdk.iot.android.iothub;
+package com.microsoft.azure.sdk.iot.androidtest.iothub;
-import com.microsoft.azure.sdk.iot.android.helper.TestGroup12;
+import com.microsoft.azure.sdk.iot.androidtest.testgroup.*;
import tests.integration.com.microsoft.azure.sdk.iot.iothub.TokenRenewalTests;
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/connection/ConnectionTestsAndroidRunner.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/connection/ConnectionTestsAndroidRunner.java
similarity index 76%
rename from iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/connection/ConnectionTestsAndroidRunner.java
rename to iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/connection/ConnectionTestsAndroidRunner.java
index 255792674a..b79a539cb0 100644
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/connection/ConnectionTestsAndroidRunner.java
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/connection/ConnectionTestsAndroidRunner.java
@@ -1,6 +1,6 @@
-package com.microsoft.azure.sdk.iot.android.iothub.connection;
+package com.microsoft.azure.sdk.iot.androidtest.iothub.connection;
-import com.microsoft.azure.sdk.iot.android.helper.TestGroup11;
+import com.microsoft.azure.sdk.iot.androidtest.testgroup.*;
import com.microsoft.azure.sdk.iot.device.IotHubClientProtocol;
import com.microsoft.azure.sdk.iot.service.auth.AuthenticationType;
import org.junit.runner.RunWith;
@@ -12,8 +12,8 @@
@RunWith(Parameterized.class)
public class ConnectionTestsAndroidRunner extends ConnectionTests
{
- public ConnectionTestsAndroidRunner(IotHubClientProtocol protocol, AuthenticationType authenticationType, ClientType clientType, boolean withProxy) throws Exception
+ public ConnectionTestsAndroidRunner(IotHubClientProtocol protocol, AuthenticationType authenticationType, ClientType clientType, boolean withProxy, boolean withProxyAuth) throws Exception
{
- super(protocol, authenticationType, clientType, withProxy);
+ super(protocol, authenticationType, clientType, withProxy, withProxyAuth);
}
}
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/digitaltwin/DigitalTwinClientAndroidRunner.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/digitaltwin/DigitalTwinClientAndroidRunner.java
similarity index 79%
rename from iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/digitaltwin/DigitalTwinClientAndroidRunner.java
rename to iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/digitaltwin/DigitalTwinClientAndroidRunner.java
index d3d041bf1c..9231a7a8bb 100644
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/digitaltwin/DigitalTwinClientAndroidRunner.java
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/digitaltwin/DigitalTwinClientAndroidRunner.java
@@ -3,9 +3,9 @@
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
-package com.microsoft.azure.sdk.iot.android.digitaltwin;
+package com.microsoft.azure.sdk.iot.androidtest.iothub.digitaltwin;
-import com.microsoft.azure.sdk.iot.android.helper.TestGroup10;
+import com.microsoft.azure.sdk.iot.androidtest.testgroup.*;
import tests.integration.com.microsoft.azure.sdk.iot.digitaltwin.DigitalTwinClientTests;
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/digitaltwin/DigitalTwinClientComponentTestsAndroidRunner.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/digitaltwin/DigitalTwinClientComponentTestsAndroidRunner.java
similarity index 81%
rename from iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/digitaltwin/DigitalTwinClientComponentTestsAndroidRunner.java
rename to iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/digitaltwin/DigitalTwinClientComponentTestsAndroidRunner.java
index 5c3886c0c9..bac2cc95d0 100644
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/digitaltwin/DigitalTwinClientComponentTestsAndroidRunner.java
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/digitaltwin/DigitalTwinClientComponentTestsAndroidRunner.java
@@ -3,9 +3,9 @@
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
-package com.microsoft.azure.sdk.iot.android.digitaltwin;
+package com.microsoft.azure.sdk.iot.androidtest.iothub.digitaltwin;
-import com.microsoft.azure.sdk.iot.android.helper.TestGroup10;
+import com.microsoft.azure.sdk.iot.androidtest.testgroup.*;
import tests.integration.com.microsoft.azure.sdk.iot.digitaltwin.DigitalTwinClientComponentTests;
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/errorinjection/DirectMethodsErrInjAndroidRunner.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/errorinjection/DirectMethodsErrInjAndroidRunner.java
similarity index 87%
rename from iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/errorinjection/DirectMethodsErrInjAndroidRunner.java
rename to iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/errorinjection/DirectMethodsErrInjAndroidRunner.java
index d99b2b205b..1989f4ad27 100644
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/errorinjection/DirectMethodsErrInjAndroidRunner.java
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/errorinjection/DirectMethodsErrInjAndroidRunner.java
@@ -3,9 +3,9 @@
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
-package com.microsoft.azure.sdk.iot.android.iothub.errorinjection;
+package com.microsoft.azure.sdk.iot.androidtest.iothub.errorinjection;
-import com.microsoft.azure.sdk.iot.android.helper.TestGroup5;
+import com.microsoft.azure.sdk.iot.androidtest.testgroup.*;
import com.microsoft.azure.sdk.iot.device.IotHubClientProtocol;
import com.microsoft.azure.sdk.iot.service.auth.AuthenticationType;
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/errorinjection/ReceiveMessagesErrInjAndroidRunner.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/errorinjection/ReceiveMessagesErrInjAndroidRunner.java
similarity index 87%
rename from iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/errorinjection/ReceiveMessagesErrInjAndroidRunner.java
rename to iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/errorinjection/ReceiveMessagesErrInjAndroidRunner.java
index 683fc56e39..a5cec7d907 100644
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/errorinjection/ReceiveMessagesErrInjAndroidRunner.java
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/errorinjection/ReceiveMessagesErrInjAndroidRunner.java
@@ -3,9 +3,9 @@
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
-package com.microsoft.azure.sdk.iot.android.iothub.errorinjection;
+package com.microsoft.azure.sdk.iot.androidtest.iothub.errorinjection;
-import com.microsoft.azure.sdk.iot.android.helper.TestGroup3;
+import com.microsoft.azure.sdk.iot.androidtest.testgroup.*;
import com.microsoft.azure.sdk.iot.device.IotHubClientProtocol;
import com.microsoft.azure.sdk.iot.service.auth.AuthenticationType;
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/errorinjection/SendMessagesErrInjAndroidRunner.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/errorinjection/SendMessagesErrInjAndroidRunner.java
similarity index 87%
rename from iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/errorinjection/SendMessagesErrInjAndroidRunner.java
rename to iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/errorinjection/SendMessagesErrInjAndroidRunner.java
index 6445c718d1..e59330fd21 100644
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/errorinjection/SendMessagesErrInjAndroidRunner.java
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/errorinjection/SendMessagesErrInjAndroidRunner.java
@@ -3,9 +3,9 @@
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
-package com.microsoft.azure.sdk.iot.android.iothub.errorinjection;
+package com.microsoft.azure.sdk.iot.androidtest.iothub.errorinjection;
-import com.microsoft.azure.sdk.iot.android.helper.TestGroup4;
+import com.microsoft.azure.sdk.iot.androidtest.testgroup.*;
import com.microsoft.azure.sdk.iot.device.IotHubClientProtocol;
import com.microsoft.azure.sdk.iot.service.auth.AuthenticationType;
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/errorinjection/TwinErrInjAndroidRunner.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/errorinjection/TwinErrInjAndroidRunner.java
similarity index 86%
rename from iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/errorinjection/TwinErrInjAndroidRunner.java
rename to iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/errorinjection/TwinErrInjAndroidRunner.java
index ee24fc600a..052c20a4a3 100644
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/errorinjection/TwinErrInjAndroidRunner.java
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/errorinjection/TwinErrInjAndroidRunner.java
@@ -3,9 +3,9 @@
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
-package com.microsoft.azure.sdk.iot.android.iothub.errorinjection;
+package com.microsoft.azure.sdk.iot.androidtest.iothub.errorinjection;
-import com.microsoft.azure.sdk.iot.android.helper.TestGroup7;
+import com.microsoft.azure.sdk.iot.androidtest.testgroup.*;
import com.microsoft.azure.sdk.iot.device.IotHubClientProtocol;
import com.microsoft.azure.sdk.iot.service.auth.AuthenticationType;
import org.junit.runner.RunWith;
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/messaging/ReceiveMessagesAndroidRunner.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/messaging/ReceiveMessagesAndroidRunner.java
similarity index 87%
rename from iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/messaging/ReceiveMessagesAndroidRunner.java
rename to iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/messaging/ReceiveMessagesAndroidRunner.java
index dced9f3bfb..9606b994a8 100644
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/messaging/ReceiveMessagesAndroidRunner.java
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/messaging/ReceiveMessagesAndroidRunner.java
@@ -3,9 +3,9 @@
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
-package com.microsoft.azure.sdk.iot.android.iothub.messaging;
+package com.microsoft.azure.sdk.iot.androidtest.iothub.messaging;
-import com.microsoft.azure.sdk.iot.android.helper.TestGroup8;
+import com.microsoft.azure.sdk.iot.androidtest.testgroup.*;
import com.microsoft.azure.sdk.iot.device.IotHubClientProtocol;
import com.microsoft.azure.sdk.iot.service.auth.AuthenticationType;
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/messaging/SendMessagesAndroidRunner.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/messaging/SendMessagesAndroidRunner.java
similarity index 87%
rename from iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/messaging/SendMessagesAndroidRunner.java
rename to iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/messaging/SendMessagesAndroidRunner.java
index 8b553fc856..0e90fe9907 100644
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/messaging/SendMessagesAndroidRunner.java
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/messaging/SendMessagesAndroidRunner.java
@@ -3,9 +3,9 @@
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
-package com.microsoft.azure.sdk.iot.android.iothub.messaging;
+package com.microsoft.azure.sdk.iot.androidtest.iothub.messaging;
-import com.microsoft.azure.sdk.iot.android.helper.TestGroup8;
+import com.microsoft.azure.sdk.iot.androidtest.testgroup.*;
import com.microsoft.azure.sdk.iot.device.IotHubClientProtocol;
import com.microsoft.azure.sdk.iot.service.auth.AuthenticationType;
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/methods/DirectMethodsAndroidRunner.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/methods/DirectMethodsAndroidRunner.java
similarity index 87%
rename from iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/methods/DirectMethodsAndroidRunner.java
rename to iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/methods/DirectMethodsAndroidRunner.java
index a6ff74aa2b..076d7b5416 100644
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/methods/DirectMethodsAndroidRunner.java
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/methods/DirectMethodsAndroidRunner.java
@@ -3,9 +3,9 @@
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
-package com.microsoft.azure.sdk.iot.android.iothub.methods;
+package com.microsoft.azure.sdk.iot.androidtest.iothub.methods;
-import com.microsoft.azure.sdk.iot.android.helper.TestGroup9;
+import com.microsoft.azure.sdk.iot.androidtest.testgroup.*;
import com.microsoft.azure.sdk.iot.device.IotHubClientProtocol;
import com.microsoft.azure.sdk.iot.service.auth.AuthenticationType;
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/twin/TwinAndroidRunner.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/twin/TwinAndroidRunner.java
similarity index 87%
rename from iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/twin/TwinAndroidRunner.java
rename to iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/twin/TwinAndroidRunner.java
index 4b2c9903ec..338b4fc504 100644
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/iothub/twin/TwinAndroidRunner.java
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/iothub/twin/TwinAndroidRunner.java
@@ -3,9 +3,9 @@
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
-package com.microsoft.azure.sdk.iot.android.iothub.twin;
+package com.microsoft.azure.sdk.iot.androidtest.iothub.twin;
-import com.microsoft.azure.sdk.iot.android.helper.TestGroup10;
+import com.microsoft.azure.sdk.iot.androidtest.testgroup.*;
import com.microsoft.azure.sdk.iot.device.IotHubClientProtocol;
import com.microsoft.azure.sdk.iot.service.auth.AuthenticationType;
import org.junit.runner.RunWith;
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/provisioning/ProvisioningClientSymmetricKeyAndroidRunner.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/provisioning/ProvisioningClientSymmetricKeyAndroidRunner.java
similarity index 90%
rename from iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/provisioning/ProvisioningClientSymmetricKeyAndroidRunner.java
rename to iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/provisioning/ProvisioningClientSymmetricKeyAndroidRunner.java
index cc4d944809..2fadc6c0a9 100644
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/provisioning/ProvisioningClientSymmetricKeyAndroidRunner.java
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/provisioning/ProvisioningClientSymmetricKeyAndroidRunner.java
@@ -3,9 +3,9 @@
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
-package com.microsoft.azure.sdk.iot.android.provisioning;
+package com.microsoft.azure.sdk.iot.androidtest.provisioning;
-import com.microsoft.azure.sdk.iot.android.helper.TestGroup1;
+import com.microsoft.azure.sdk.iot.androidtest.testgroup.*;
import com.microsoft.azure.sdk.iot.provisioning.device.ProvisioningDeviceClientTransportProtocol;
import org.junit.runner.RunWith;
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/provisioning/ProvisioningClientX509AndroidRunner.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/provisioning/ProvisioningClientX509AndroidRunner.java
similarity index 90%
rename from iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/provisioning/ProvisioningClientX509AndroidRunner.java
rename to iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/provisioning/ProvisioningClientX509AndroidRunner.java
index 85d5228fc1..26ae5c38f8 100644
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/provisioning/ProvisioningClientX509AndroidRunner.java
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/provisioning/ProvisioningClientX509AndroidRunner.java
@@ -3,9 +3,9 @@
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
-package com.microsoft.azure.sdk.iot.android.provisioning;
+package com.microsoft.azure.sdk.iot.androidtest.provisioning;
-import com.microsoft.azure.sdk.iot.android.helper.TestGroup2;
+import com.microsoft.azure.sdk.iot.androidtest.testgroup.*;
import com.microsoft.azure.sdk.iot.provisioning.device.ProvisioningDeviceClientTransportProtocol;
import org.junit.runner.RunWith;
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/provisioning/ProvisioningServiceClientAndroidRunner.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/provisioning/ProvisioningServiceClientAndroidRunner.java
similarity index 80%
rename from iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/provisioning/ProvisioningServiceClientAndroidRunner.java
rename to iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/provisioning/ProvisioningServiceClientAndroidRunner.java
index b326774696..99813fc29f 100644
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/provisioning/ProvisioningServiceClientAndroidRunner.java
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/provisioning/ProvisioningServiceClientAndroidRunner.java
@@ -3,9 +3,9 @@
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
-package com.microsoft.azure.sdk.iot.android.provisioning;
+package com.microsoft.azure.sdk.iot.androidtest.provisioning;
-import com.microsoft.azure.sdk.iot.android.helper.TestGroup1;
+import com.microsoft.azure.sdk.iot.androidtest.testgroup.TestGroup1;
import tests.integration.com.microsoft.azure.sdk.iot.provisioning.ProvisioningServiceClientTests;
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup1.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup1.java
similarity index 56%
rename from iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup1.java
rename to iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup1.java
index a74ded95b3..8de46b727d 100644
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup1.java
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup1.java
@@ -1,10 +1,4 @@
-/*
- * Copyright (c) Microsoft. All rights reserved.
- * Licensed under the MIT license. See LICENSE file in the project root for full license information.
- */
-
-package com.microsoft.azure.sdk.iot.android.helper;
-
+package com.microsoft.azure.sdk.iot.androidtest.testgroup;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -14,4 +8,4 @@
@Retention(RetentionPolicy.RUNTIME)
public @interface TestGroup1
{
-}
\ No newline at end of file
+}
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup2.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup10.java
similarity index 50%
rename from iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup2.java
rename to iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup10.java
index 10b2069954..533af07e34 100644
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup2.java
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup10.java
@@ -1,10 +1,5 @@
-/*
- * Copyright (c) Microsoft. All rights reserved.
- * Licensed under the MIT license. See LICENSE file in the project root for full license information.
- */
-
-package com.microsoft.azure.sdk.iot.android.helper;
+package com.microsoft.azure.sdk.iot.androidtest.testgroup;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -12,6 +7,5 @@
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
-public @interface TestGroup2
-{
-}
\ No newline at end of file
+public @interface TestGroup10 {
+}
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup3.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup11.java
similarity index 50%
rename from iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup3.java
rename to iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup11.java
index 5f7536edc5..278ee9247e 100644
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup3.java
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup11.java
@@ -1,10 +1,5 @@
-/*
- * Copyright (c) Microsoft. All rights reserved.
- * Licensed under the MIT license. See LICENSE file in the project root for full license information.
- */
-
-package com.microsoft.azure.sdk.iot.android.helper;
+package com.microsoft.azure.sdk.iot.androidtest.testgroup;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -12,6 +7,5 @@
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
-public @interface TestGroup3
-{
-}
\ No newline at end of file
+public @interface TestGroup11 {
+}
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup4.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup12.java
similarity index 50%
rename from iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup4.java
rename to iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup12.java
index eec5a84751..af16ec7a91 100644
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup4.java
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup12.java
@@ -1,10 +1,5 @@
-/*
- * Copyright (c) Microsoft. All rights reserved.
- * Licensed under the MIT license. See LICENSE file in the project root for full license information.
- */
-
-package com.microsoft.azure.sdk.iot.android.helper;
+package com.microsoft.azure.sdk.iot.androidtest.testgroup;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -12,6 +7,5 @@
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
-public @interface TestGroup4
-{
-}
\ No newline at end of file
+public @interface TestGroup12 {
+}
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup2.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup2.java
new file mode 100644
index 0000000000..44ec552979
--- /dev/null
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup2.java
@@ -0,0 +1,10 @@
+package com.microsoft.azure.sdk.iot.androidtest.testgroup;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ElementType.METHOD, ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface TestGroup2 {
+}
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup3.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup3.java
new file mode 100644
index 0000000000..c612439162
--- /dev/null
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup3.java
@@ -0,0 +1,10 @@
+package com.microsoft.azure.sdk.iot.androidtest.testgroup;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ElementType.METHOD, ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface TestGroup3 {
+}
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup4.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup4.java
new file mode 100644
index 0000000000..e4f3ad4db6
--- /dev/null
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup4.java
@@ -0,0 +1,10 @@
+package com.microsoft.azure.sdk.iot.androidtest.testgroup;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ElementType.METHOD, ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface TestGroup4 {
+}
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup5.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup5.java
similarity index 50%
rename from iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup5.java
rename to iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup5.java
index 176a019c2a..8f3b4b103e 100644
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup5.java
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup5.java
@@ -1,10 +1,4 @@
-/*
- * Copyright (c) Microsoft. All rights reserved.
- * Licensed under the MIT license. See LICENSE file in the project root for full license information.
- */
-
-package com.microsoft.azure.sdk.iot.android.helper;
-
+package com.microsoft.azure.sdk.iot.androidtest.testgroup;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -12,6 +6,5 @@
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
-public @interface TestGroup5
-{
-}
\ No newline at end of file
+public @interface TestGroup5 {
+}
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup6.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup6.java
similarity index 50%
rename from iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup6.java
rename to iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup6.java
index 77a9dfeda8..b17980bf52 100644
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup6.java
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup6.java
@@ -1,10 +1,5 @@
-/*
- * Copyright (c) Microsoft. All rights reserved.
- * Licensed under the MIT license. See LICENSE file in the project root for full license information.
- */
-
-package com.microsoft.azure.sdk.iot.android.helper;
+package com.microsoft.azure.sdk.iot.androidtest.testgroup;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -12,6 +7,5 @@
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
-public @interface TestGroup6
-{
-}
\ No newline at end of file
+public @interface TestGroup6 {
+}
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup7.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup7.java
similarity index 50%
rename from iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup7.java
rename to iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup7.java
index 2f76099385..091f459217 100644
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup7.java
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup7.java
@@ -1,10 +1,5 @@
-/*
- * Copyright (c) Microsoft. All rights reserved.
- * Licensed under the MIT license. See LICENSE file in the project root for full license information.
- */
-
-package com.microsoft.azure.sdk.iot.android.helper;
+package com.microsoft.azure.sdk.iot.androidtest.testgroup;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -12,6 +7,5 @@
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
-public @interface TestGroup7
-{
-}
\ No newline at end of file
+public @interface TestGroup7 {
+}
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup8.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup8.java
similarity index 50%
rename from iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup8.java
rename to iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup8.java
index 5d3ec5a5ed..f71b5b1818 100644
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup8.java
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup8.java
@@ -1,10 +1,5 @@
-/*
- * Copyright (c) Microsoft. All rights reserved.
- * Licensed under the MIT license. See LICENSE file in the project root for full license information.
- */
-
-package com.microsoft.azure.sdk.iot.android.helper;
+package com.microsoft.azure.sdk.iot.androidtest.testgroup;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -12,6 +7,5 @@
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
-public @interface TestGroup8
-{
-}
\ No newline at end of file
+public @interface TestGroup8 {
+}
diff --git a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup9.java b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup9.java
similarity index 50%
rename from iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup9.java
rename to iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup9.java
index afe1137073..8b10c5a6c7 100644
--- a/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/android/helper/TestGroup9.java
+++ b/iot-e2e-tests/android/app/src/androidTest/java/com/microsoft/azure/sdk/iot/androidtest/testgroup/TestGroup9.java
@@ -1,10 +1,5 @@
-/*
- * Copyright (c) Microsoft. All rights reserved.
- * Licensed under the MIT license. See LICENSE file in the project root for full license information.
- */
-
-package com.microsoft.azure.sdk.iot.android.helper;
+package com.microsoft.azure.sdk.iot.androidtest.testgroup;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -12,6 +7,5 @@
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
-public @interface TestGroup9
-{
-}
\ No newline at end of file
+public @interface TestGroup9 {
+}
diff --git a/iot-e2e-tests/android/app/src/main/AndroidManifest.xml b/iot-e2e-tests/android/app/src/main/AndroidManifest.xml
index c502335841..c70e12201d 100644
--- a/iot-e2e-tests/android/app/src/main/AndroidManifest.xml
+++ b/iot-e2e-tests/android/app/src/main/AndroidManifest.xml
@@ -1,6 +1,6 @@
-
-
+ package="com.microsoft.azure.sdk.iot.androidtest">
+
+
\ No newline at end of file
diff --git a/iot-e2e-tests/android/build.gradle b/iot-e2e-tests/android/build.gradle
index 685f19721b..37562787fc 100644
--- a/iot-e2e-tests/android/build.gradle
+++ b/iot-e2e-tests/android/build.gradle
@@ -1,26 +1,4 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
-
-buildscript {
- repositories {
- google()
- mavenCentral()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:3.6.3'
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
-}
-
-allprojects {
- repositories {
- mavenLocal()
- google()
- mavenCentral()
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
+plugins {
+ alias(libs.plugins.android.application) apply false
}
\ No newline at end of file
diff --git a/iot-e2e-tests/android/gradle.properties b/iot-e2e-tests/android/gradle.properties
index 89e0d99e21..4387edc225 100644
--- a/iot-e2e-tests/android/gradle.properties
+++ b/iot-e2e-tests/android/gradle.properties
@@ -1,18 +1,21 @@
# Project-wide Gradle settings.
-
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
-
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
-
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
-# Default value: -Xmx10248m -XX:MaxPermSize=256m
-# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
-
+org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# This option should only be used with decoupled projects. For more details, visit
+# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
# org.gradle.parallel=true
+# AndroidX package structure to make it clearer which packages are bundled with the
+# Android operating system, and which are packaged with your app's APK
+# https://developer.android.com/topic/libraries/support-library/androidx-rn
+android.useAndroidX=true
+# Enables namespacing of each library's R class so that its R class includes only the
+# resources declared in the library itself and none from the library's dependencies,
+# thereby reducing the size of the R class for that library
+android.nonTransitiveRClass=true
\ No newline at end of file
diff --git a/iot-e2e-tests/android/gradle/libs.versions.toml b/iot-e2e-tests/android/gradle/libs.versions.toml
new file mode 100644
index 0000000000..dcd4625cf4
--- /dev/null
+++ b/iot-e2e-tests/android/gradle/libs.versions.toml
@@ -0,0 +1,20 @@
+[versions]
+agp = "8.13.2"
+junit = "4.13.2"
+junitVersion = "1.1.5"
+espressoCore = "3.5.1"
+appcompat = "1.6.1"
+material = "1.10.0"
+runner = "1.7.0"
+
+[libraries]
+junit = { group = "junit", name = "junit", version.ref = "junit" }
+ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
+espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
+appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
+material = { group = "com.google.android.material", name = "material", version.ref = "material" }
+runner = { module = "androidx.test:runner", version.ref = "runner" }
+
+[plugins]
+android-application = { id = "com.android.application", version.ref = "agp" }
+
diff --git a/iot-e2e-tests/android/gradle/wrapper/gradle-wrapper.properties b/iot-e2e-tests/android/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/iot-e2e-tests/android/renew_env.cmd b/iot-e2e-tests/android/renew_env.cmd
deleted file mode 100644
index 7d4a7ca585..0000000000
--- a/iot-e2e-tests/android/renew_env.cmd
+++ /dev/null
@@ -1,12 +0,0 @@
-@echo off
-echo.
-echo Refreshing ANDROID_DEVICE_NAME from registry
-
-:: Get User ANDROID_DEVICE_NAME
-for /f "tokens=3*" %%A in ('reg query "HKCU\Environment" /v ANDROID_DEVICE_NAME') do set userANDROID_DEVICE_NAME=%%A%%B
-
-:: Set Refreshed ANDROID_DEVICE_NAME
-set ANDROID_DEVICE_NAME=%userANDROID_DEVICE_NAME%
-
-echo Refreshed ANDROID_DEVICE_NAME
-echo %ANDROID_DEVICE_NAME%
\ No newline at end of file
diff --git a/iot-e2e-tests/android/runInstrumentationTests.py b/iot-e2e-tests/android/runInstrumentationTests.py
deleted file mode 100644
index 3320186fa2..0000000000
--- a/iot-e2e-tests/android/runInstrumentationTests.py
+++ /dev/null
@@ -1,20 +0,0 @@
-import subprocess
-import os
-import time
-import sys
-
-env=dict(os.environ, PATH="path")
-cmd = "adb -s "+sys.argv[1]+" shell am instrument -w -r -e debug false -e package 'com.microsoft.azure.sdk.iot.androidthings' com.microsoft.azure.sdk.iot.androidthings.test/android.support.test.runner.AndroidJUnitRunner"
-print(cmd)
-p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding='utf8')
-(out, err) = p.communicate()
-print(out)
-print(err)
-os.popen("taskkill /IM cmd.exe /FI \"WINDOWTITLE eq C:\windows\system32\cmd.exe - emulator*\"")
-os.popen("setx ANDROID_DEVICE_NAME \"\"").read()
-if "Failures:" in out or len(err)>0:
- sys.exit(-1)
- print("exit-1")
-else:
- sys.exit(0)
- print("exit-0")
\ No newline at end of file
diff --git a/iot-e2e-tests/android/runTestsOnThings.cmd b/iot-e2e-tests/android/runTestsOnThings.cmd
deleted file mode 100644
index 59b4aaacbf..0000000000
--- a/iot-e2e-tests/android/runTestsOnThings.cmd
+++ /dev/null
@@ -1,16 +0,0 @@
-@REM Copyright (c) Microsoft. All rights reserved.
-@REM Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-@REM -- Select Android Device --
-python AndroidDeviceSelect.py
-@REM -- set device variable --
-call renew_env.cmd
-ECHO We're working with "%ANDROID_DEVICE_NAME%"
-@REM -- installing device and test apk--
-ECHO installing apk on device
-call adb -s %ANDROID_DEVICE_NAME% install -r -t "things\build\outputs\apk\debug\things-debug.apk"
-ECHO installing test apk on device
-call adb -s %ANDROID_DEVICE_NAME% install -r -t "things\build\outputs\apk\androidTest\debug\things-debug-androidTest.apk"
-@REM -- Starting Android Tests --
-ECHO starting android tests
-python runInstrumentationTests.py %ANDROID_DEVICE_NAME%
diff --git a/iot-e2e-tests/android/settings.gradle b/iot-e2e-tests/android/settings.gradle
index 9d495b34f8..55c8fe60f6 100644
--- a/iot-e2e-tests/android/settings.gradle
+++ b/iot-e2e-tests/android/settings.gradle
@@ -1 +1,11 @@
-include ':app'
\ No newline at end of file
+pluginManagement {
+ repositories {
+ google()
+ mavenCentral()
+ gradlePluginPortal()
+ mavenLocal()
+ }
+}
+
+rootProject.name = "My Application"
+include ':app'
diff --git a/iot-e2e-tests/common/pom.xml b/iot-e2e-tests/common/pom.xml
index fd7fdfd2f8..7201cc2ed6 100644
--- a/iot-e2e-tests/common/pom.xml
+++ b/iot-e2e-tests/common/pom.xml
@@ -106,14 +106,11 @@
io.netty
netty-all
-
- com.azure
- azure-storage-blob
- 12.8.0
+ com.github.monkeywie
+ proxyee
+ 1.7.6
+ compile
+
+ io.netty
+ netty-buffer
+ 4.2.9.Final
+
io.netty
netty-all
@@ -115,6 +120,11 @@
netty-handler
4.2.9.Final
+
+ io.netty
+ netty-handler-proxy
+ 4.2.9.Final
+
io.netty
netty-codec
diff --git a/vsts/RunTestsOnEmulator.sh b/vsts/RunTestsOnEmulator.sh
index c1e3367d0d..5c91d5a357 100644
--- a/vsts/RunTestsOnEmulator.sh
+++ b/vsts/RunTestsOnEmulator.sh
@@ -22,12 +22,12 @@ echo 'Listing available instrumentations:'
adb -e shell pm list instrumentation
echo ''
-annotationString="com.microsoft.azure.sdk.iot.android.helper.${TEST_GROUP_ID}"
+annotationString="com.microsoft.azure.sdk.iot.androidtest.testgroup.${TEST_GROUP_ID}"
echo 'Running android tests with annotation'
echo $annotationString
#Return code from adb shell isn't returned as one would expect. Need to capture output logs and analyze them to determine if this test run was a success or not
-TestLogs=$(adb -e shell am instrument -w -e annotation $annotationString com.iothub.azure.microsoft.com.androide2e.test/android.support.test.runner.AndroidJUnitRunner)
+TestLogs=$(adb -e shell am instrument -w -e annotation $annotationString com.microsoft.azure.sdk.iot.androidtest.test/androidx.test.runner.AndroidJUnitRunner)
echo 'Result of running tests'
echo "$TestLogs"
diff --git a/vsts/StartEmulator.sh b/vsts/StartEmulator.sh
index f9874bd503..3e71305093 100644
--- a/vsts/StartEmulator.sh
+++ b/vsts/StartEmulator.sh
@@ -3,30 +3,27 @@
echo 'Listing available android sdks for installation'
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --list | grep system-images
-emulatorImage='system-images;android-28;google_apis;x86_64'
-avdName='Pixel_9.0'
+SDK="${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager"
+AVD="${ANDROID_HOME}/cmdline-tools/latest/bin/avdmanager"
+EMU="${ANDROID_HOME}/emulator/emulator"
+ADB="${ANDROID_HOME}/platform-tools/adb"
-echo ''
-echo "Installing emulator image ${emulatorImage}"
-echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install $emulatorImage
+NAME_EMU="android_emulator"
+IMG_EMU='system-images;android-28;default;x86'
-echo ''
-echo "Creating android emulator with name ${avdName}"
-echo "no" | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n $avdName -k $emulatorImage --force
+# Install AVD files
+echo "y" | $SDK --install "${IMG_EMU}"
-echo ''
-echo 'Listing active android emulators'
-$ANDROID_HOME/emulator/emulator -list-avds
+# Create emulator
+echo "no" | $AVD create avd -n ${NAME_EMU} -k "${IMG_EMU}" --force
-echo ''
-echo "Starting emulator in background thread"
-nohup $ANDROID_HOME/emulator/emulator -avd $avdName -gpu auto -no-snapshot > /dev/null 2>&1 &
+echo ""
+echo "List AVDs:"
+$EMU -list-avds
-echo ''
-echo 'Waiting for emulator to boot up...'
-nohup $ANDROID_HOME/emulator/emulator -avd $avdName -no-snapshot -no-audio -no-boot-anim -accel auto -gpu auto -qemu -lcd-density 420 > /dev/null 2>&1 &
- $ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done'
- $ANDROID_HOME/platform-tools/adb devices echo "Emulator started"
-
-$ANDROID_HOME/platform-tools/adb devices
+# Start emulator in background and with no UI (-no-window), as we're only running database tests.
+nohup $EMU -avd ${NAME_EMU} -no-window -no-snapshot -no-audio -no-boot-anim > /dev/null 2>&1 &
+$ADB wait-for-device
+$ADB shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done; input keyevent 82'
+$ADB devices
\ No newline at end of file
diff --git a/vsts/gradle_build.ps1 b/vsts/gradle_build.ps1
index 5393b575ed..dd8095b52c 100644
--- a/vsts/gradle_build.ps1
+++ b/vsts/gradle_build.ps1
@@ -3,11 +3,11 @@ cd iot-e2e-tests\android
# This script pulls down this version of gradle because the default version installed on ADO
# can change over time. This allows us more control over when we want to upgrade gradle versions
-Invoke-WebRequest -Uri "https://services.gradle.org/distributions/gradle-6.8.3-bin.zip" -OutFile ./gradle.zip
+Invoke-WebRequest -Uri "https://services.gradle.org/distributions/gradle-9.2.1-bin.zip" -OutFile ./gradle.zip
Expand-Archive ./gradle.zip
Write-Host "Starting the Gradle Wrapper"
-./gradle/gradle-6.8.3/bin/gradle wrapper
+./gradle/gradle-9.2.1/bin/gradle wrapper --stacktrace
Write-Host "Assembling the source APK"
./gradlew :app:assembleDebug
@@ -20,10 +20,5 @@ Write-Host "Assembling the test APK with the provided secrets"
./gradlew :app:assembleDebugAndroidTest `
`-PIOTHUB_CONNECTION_STRING=$env:IOTHUB_CONNECTION_STRING `
`-PIOT_DPS_CONNECTION_STRING=$env:IOT_DPS_CONNECTION_STRING `
- `-PIOT_DPS_ID_SCOPE=$env:DEVICE_PROVISIONING_SERVICE_ID_SCOPE `
- `-PDPS_GLOBALDEVICEENDPOINT_INVALIDCERT=$env:INVALID_DEVICE_PROVISIONING_SERVICE_GLOBAL_ENDPOINT `
- `-PPROVISIONING_CONNECTION_STRING_INVALIDCERT=$env:INVALID_DEVICE_PROVISIONING_SERVICE_CONNECTION_STRING `
- `-PDPS_GLOBALDEVICEENDPOINT=$env:DPS_GLOBALDEVICEENDPOINT `
- `-PIS_BASIC_TIER_HUB=$env:IS_BASIC_TIER_HUB `
- `-PIS_PULL_REQUEST=$env:isPullRequestBuild `
+ `-PIOT_DPS_ID_SCOPE=$env:IOT_DPS_ID_SCOPE `
`-PRECYCLE_TEST_IDENTITIES=true
diff --git a/vsts/windowsLinuxAndAndroidBuildMatrixConfig.yaml b/vsts/windowsLinuxAndAndroidBuildMatrixConfig.yaml
index 9e542d150d..e54ffcb5be 100644
--- a/vsts/windowsLinuxAndAndroidBuildMatrixConfig.yaml
+++ b/vsts/windowsLinuxAndAndroidBuildMatrixConfig.yaml
@@ -21,7 +21,7 @@ jobs:
vmImage: windows-latest
steps:
- task: AzureCLI@2
- name: deployCloudTestResources
+ name: deployCloudTestResources
inputs:
azureSubscription: 'iot hub sdk service connection'
scriptType: 'pscore'
@@ -244,8 +244,13 @@ jobs:
pool:
vmImage: ubuntu-latest
displayName: Android Build
- condition: false
steps:
+ - task: JavaToolInstaller@0
+ inputs:
+ versionSpec: 17
+ jdkArchitectureOption: 'x64'
+ jdkSourceOption: 'PreInstalled'
+
- powershell: ./vsts/echo_versions.ps1
displayName: 'Echo Versions'
env:
@@ -265,7 +270,7 @@ jobs:
IOT_DPS_ID_SCOPE: $(DPS_IDSCOPE)
IOTHUB_CONNECTION_STRING: $(IOTHUB_CONNECTION_STRING)
TARGET_BRANCH: $(System.PullRequest.TargetBranch)
- RECYCLE_TEST_IDENTITIES: true
+ RECYCLE_TEST_IDENTITIES: "true"
condition: always()
- task: CopyFiles@2
@@ -294,7 +299,6 @@ jobs:
- job: AndroidTest
timeoutInMinutes: 50
- condition: false
pool:
vmImage: 'macOS-latest'
strategy:
@@ -379,6 +383,7 @@ jobs:
dependsOn:
- Windows
- Linux
+ - AndroidTest
- DeployCloudTestResources
variables:
RESOURCE_GROUP_NAME: $[ dependencies.DeployCloudTestResources.outputs['deployCloudTestResources.RESOURCE_GROUP_NAME'] ]