allure-framework / allure-kotlin

Allure integrations for test frameworks targeting Kotlin and Java with 1.6 source compatibility.
Apache License 2.0
57 stars 21 forks source link

UI tests doesn't start after update to kotlin 1.5 #58

Closed Jacks0N23 closed 3 years ago

Jacks0N23 commented 3 years ago

I'm submitting a ...

What is the current behavior?

After update to kotlin 1.5 (with useOldBackend = true, because of problems with new IR) test stopped to run. After some investigation I figured out that problem somewhere in allure.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

if set: testInstrumentationRunner "io.qameta.allure.android.runners.AllureAndroidJUnitRunner" then tests event not started. But when I replace it with parent of it - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" then it's run successfully. I also tested that it's doesn't matter what targer sdk 30 or 29. BUT. Problem only on emulator/device with android 11 (30sdk). With lower everything okay.

What is the expected behavior?

Tests starts and run

Please tell us about your environment:

Allure version 2.2.5
kotlin 1.5(useOldBackend=true)
Test framework junit@4.13.2
Allure integration allure-kotlin-android@2.2.5

Other information

image image

flotnik commented 3 years ago

This problem happens due to Android 11.

viclovsky commented 3 years ago

Hi, @Jacks0N23. Could you check the latest version of allure-kotlin (2.2.6), I have merged some fixes.

flotnik commented 3 years ago

I have checked on 2.2.6 and test still do not start on Android 11.

viclovsky commented 3 years ago

Hi, @flotnik

To be honest I need more information to reproduce your issue. It would be great if you add some example right to GitHub. I have checked it locally and it works. изображение

Thanks.

nickmi11er commented 3 years ago

Hi, @viclovsky! I've also tried to bump version to 2.2.6 but the problem stays.

Снимок экрана 2021-06-01 в 18 37 27
flotnik commented 3 years ago

Adding to app manifest MANAGE_EXTERNAL_STORAGE permission solved my problem. With this permission tests are able to start on Android 11 with allure-kotlin:2.2.6

nickmi11er commented 3 years ago

@flotnik Thanks! Now it actually works!

viclovsky commented 3 years ago

I am closing the issue. I have updated ReadMe with correct manifest Also, here is some examples, feel free to play with it.