From 29a6322bd9f012feb36790c50620db208c3b82d5 Mon Sep 17 00:00:00 2001 From: Aleksei Tiurin Date: Wed, 31 Jul 2024 22:56:37 +0300 Subject: [PATCH] Open UltronAllureTestRunner --- sample-app/build.gradle.kts | 2 +- .../java/com/atiurin/sampleapp/framework/CustomTestRunner.kt | 5 +++++ .../java/com/atiurin/ultron/allure/UltronAllureTestRunner.kt | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 sample-app/src/androidTest/java/com/atiurin/sampleapp/framework/CustomTestRunner.kt diff --git a/sample-app/build.gradle.kts b/sample-app/build.gradle.kts index 8e0c4c26..cfbab144 100644 --- a/sample-app/build.gradle.kts +++ b/sample-app/build.gradle.kts @@ -12,7 +12,7 @@ android { minSdk = 21 targetSdk = 34 multiDexEnabled = true - testInstrumentationRunner = "com.atiurin.ultron.allure.UltronAllureTestRunner" + testInstrumentationRunner = "com.atiurin.sampleapp.framework.CustomTestRunner" } compileOptions { diff --git a/sample-app/src/androidTest/java/com/atiurin/sampleapp/framework/CustomTestRunner.kt b/sample-app/src/androidTest/java/com/atiurin/sampleapp/framework/CustomTestRunner.kt new file mode 100644 index 00000000..e5df6193 --- /dev/null +++ b/sample-app/src/androidTest/java/com/atiurin/sampleapp/framework/CustomTestRunner.kt @@ -0,0 +1,5 @@ +package com.atiurin.sampleapp.framework + +import com.atiurin.ultron.allure.UltronAllureTestRunner + +class CustomTestRunner : UltronAllureTestRunner() {} \ No newline at end of file diff --git a/ultron-allure/src/main/java/com/atiurin/ultron/allure/UltronAllureTestRunner.kt b/ultron-allure/src/main/java/com/atiurin/ultron/allure/UltronAllureTestRunner.kt index 6363599d..11ac11f0 100644 --- a/ultron-allure/src/main/java/com/atiurin/ultron/allure/UltronAllureTestRunner.kt +++ b/ultron-allure/src/main/java/com/atiurin/ultron/allure/UltronAllureTestRunner.kt @@ -8,11 +8,11 @@ import com.atiurin.ultron.extensions.putArguments import com.atiurin.ultron.runner.UltronRunInformer import io.qameta.allure.android.runners.AllureAndroidJUnitRunner -class UltronAllureTestRunner : AllureAndroidJUnitRunner() { +open class UltronAllureTestRunner : AllureAndroidJUnitRunner() { val informer: UltronRunInformer = UltronAllureRunInformer() override fun onCreate(arguments: Bundle) { - arguments.putArguments("listener", UltronTestRunListener::class.java.name) + arguments.putArguments("listener", UltronTestRunListener::class.qualifiedName!!) super.onCreate(arguments) } }