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
6 changes: 3 additions & 3 deletions .woodpecker/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ labels:
platform: android-emulator

steps:
- name: run tests
- name: integration tests
image: *android_image
commands:
- adb connect android-emulator-cuda:5555
- adb devices
- curl -L -o adbserver-desktop.jar https://github.com/KasperskyLab/Kaspresso/refs/tags/1.6.0/artifacts/adbserver-desktop.jar
- curl -fL -o adbserver-desktop.jar https://raw.githubusercontent.com/KasperskyLab/Kaspresso/v.1.6.0/artifacts/adbserver-desktop.jar
- java -jar adbserver-desktop.jar &
- sleep 3
- ./gradlew :opencloudApp:connectedOriginalDebugAndroidTest --console=plain
- ./gradlew :opencloudApp:connectedOriginalDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=eu.opencloud.android.IntegrationTest --console=plain

- name: instrumented data tests
image: *android_image
Expand Down
1 change: 1 addition & 0 deletions opencloudApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ dependencies {

// Instrumented tests
androidTestImplementation project(":opencloudTestUtil")
androidTestImplementation libs.junit4
androidTestImplementation libs.androidx.annotation
androidTestImplementation libs.androidx.arch.core.testing
androidTestImplementation libs.androidx.test.core
Expand Down
2 changes: 1 addition & 1 deletion opencloudApp/src/integrationTest/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
hostname: android-emulator-cuda
restart: unless-stopped
environment:
- DISABLE_ANIMATION=false
- DISABLE_ANIMATION=true
- DISABLE_HIDDEN_POLICY=true
- SKIP_AUTH=false
- MEMORY=16384
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package eu.opencloud.android

/**
* Marks an end-to-end integration test (src/integrationTest) that drives the real UI against a
* running OpenCloud server on the emulator, as opposed to the isolated instrumented tests.
*
* Run only these tests with:
* ./gradlew :opencloudApp:connectedOriginalDebugAndroidTest \
* -Pandroid.testInstrumentationRunnerArguments.annotation=eu.opencloud.android.IntegrationTest
*
* Retention must be RUNTIME so the AndroidJUnitRunner can read it for filtering.
*/
@Retention(AnnotationRetention.RUNTIME)
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
annotation class IntegrationTest
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import screens.MainScreen
import screens.ManageAccountsDialog
import screens.StartScreen

@IntegrationTest
class LoginTest : TestCase(
kaspressoBuilder = Kaspresso.Builder.advanced {
flakySafetyParams = FlakySafetyParams.custom(
Expand Down
7 changes: 6 additions & 1 deletion opencloudComLibrary/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ apply plugin: 'kotlin-parcelize'
dependencies {
api 'com.squareup.okhttp3:okhttp:4.9.2'
implementation libs.kotlin.stdlib
api 'com.github.opencloud-eu:android-dav:oc_support_2.1.6'
api('com.github.opencloud-eu:android-dav:oc_support_2.1.6') {
// xpp3:1.1.6 drags in a stray junit:junit:4.7 at runtime scope, which leaks
// into the production classpath and pins the androidTest classpath to
// "strictly 4.7" via AGP consistent resolution, breaking androidx.test (junit 4.13.2).
exclude group: 'junit', module: 'junit'
}

// Androidx
implementation libs.androidx.core.ktx
Expand Down
Loading