Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ internal fun LoginPasswordContent(
PasswordInput(
modifier = Modifier
.fillMaxWidth()
.padding(bottom = dimensions().spacing8x),
.padding(bottom = dimensions().spacing8x)
.testTag("PasswordInput"),
passwordState = passwordTextState,
)
if (serverConfig.isProxyAuthRequired) {
Expand All @@ -237,7 +238,8 @@ internal fun LoginPasswordContent(
onClick = onLoginButtonClick,
modifier = Modifier
.fillMaxWidth()
.padding(bottom = dimensions().spacing8x),
.padding(bottom = dimensions().spacing8x)
.testTag("LoginNextButton"),

)
if (!serverConfig.isProxyAuthRequired) {
Expand Down
22 changes: 22 additions & 0 deletions benchmark/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## App Benchmarks

This is the benchmark project for the Android App. To run the benchmarks, the following prerequisites must be met:

- A real Android device is used for testing (emulators are not supported).
- There is a beta benchmark build of the app installed on the device.
- If using the test with login, make sure the max amount of devices registered to the account is not exceeded.

### Building the benchmark APK
To build the benchmark APK, use the following command:

```shell
./gradlew clean assembleBetaBenchmark
```

### Running the benchmarks
To run the benchmarks, use the following command:
```shell
./gradlew :benchmark:connectedDebugAndroidTest
```

Alternatively, you can run the benchmarks directly from Android Studio by selecting the `benchmark` module and running the `connectedDebugAndroidTest` configuration.
6 changes: 6 additions & 0 deletions benchmark/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,9 @@ dependencies {
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(libs.androidx.benchmark.macro.junit4)
}

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(JavaVersion.VERSION_17.majorVersion))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,16 @@ class StartupBenchmarkWithLogin {
}

private fun MacrobenchmarkScope.login() {
device.findObject(By.res("loginButton"))?.let {
it.click()
}
device.findObject(By.res("userIdentifierInput"))?.let {
it.text = EMAIL
}
device.findObject(By.res("loginButton"))?.let {
it.click()
}
device.findObject(By.res("PasswordInput"))?.let {
it.text = PASSWORD
}
device.findObject(By.res("loginButton"))?.let {
device.findObject(By.res("LoginNextButton"))?.let {
it.click()
}
device.wait(Until.hasObject(By.text("Conversations")), 30_000)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ class AndroidLibraryConventionPlugin : Plugin<Project> {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
create("benchmark") {
initWith(getByName("release"))
matchingFallbacks.add("release")
}
}

val crowdinTask = tasks.register("addEntryToCrowdinFile", AddEntryToCrowdinTask::class.java) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ class AndroidTestLibraryConventionPlugin : Plugin<Project> {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
create("benchmark") {
initWith(getByName("release"))
matchingFallbacks.add("release")
}
}
}
}
Expand Down
6 changes: 1 addition & 5 deletions core/navigation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@ plugins {

android {
namespace = "com.wire.android.navigation"
buildTypes {
create("benchmark") {
}
}
}

dependencies {
implementation(projects.core.uiCommon)
implementation(libs.visibilityModifiers)
implementation(libs.compose.navigation)
implementation(libs.compose.destinations.core)
implementation(project(":core:ui-common"))
implementation(libs.compose.material3)
}
Loading