Allure-Kotlin 不会在 Espresso 测试中创建 allure-results

Allure-Kotlin does not create allure-results in Espresso tests

我逐步尝试了 Allure-Kotlin 中的说明进行 android 测试。但是当我 运行(on Pixel_4_API_29):

完成我的测试后

adb pull /sdcard/allure-results 显示此消息:

adb: error: failed to stat remote object '/sdcard/allure-results': No such file or directory

这是我创建的 sample repo 来展示我所做的事情。

更多信息:我 运行 使用 ./gradlew app:connectedAndroidTest 进行测试,测试 运行 使用 @RunWith(AllureAndroidJUnit4.class),我已经将 allure.prperties 文件添加到 android测试资源以及 META-INF.services 的侦听器。此外,我将 Kotlin 版本更新为 1.4.21 并将 Gradle 更新为 6.7.1 以与 allure-kotlin 2.2.5 匹配。我也已经确定了访问模拟器上的 /sdcard 文件夹所需的权限。

非常感谢任何有帮助的回答和评论。

您是否尝试过 adb pull /sdcard 提取所有内容,然后查看 sdcard 文件夹是否有问题?

此外,另一个问题可能是语法错误adb pull "/sdcard/allure-results/"

除此之外,还有很多关于发布错误主题的问题,例如:How do I adb pull ALL files of a folder present in SD Card

希望本文对您有所帮助! :D

我看过你的代码。看起来你在 AndroidManifest.xml 中遇到了问题。 请检查 pr

我们准备了几个examples。这样你就可以一睹为快,摸摸allure-kotlin了。