寻找在Android中为测试结果生成报告的好工具。
我正在尝试连接Allure以生成针对Android的集成测试的报告。作为测试框架,我正在使用Robotium。
找不到任何教程如何集成此工具。
有可能吗?或者有关生成报告的工具的任何建议?
这是我的build.gradle
configurations {
agent
}
connectedCheck.doFirst {
jvmArgs "-javaagent:${configurations.agent.singleFile}"
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.2.1'
agent "org.aspectj:aspectjweaver:${aspectjVersion}"
androidTestCompile "ru.yandex.qatools.allure:allure-testng-adaptor:${allureVersion}"
}
并输出:
1 error; aborting
:app:preDexDebugTest FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:preDexDebugTest'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/Users/vovs/Android/android-sdk-macosx/build-tools/20.0.0/dx --dex --output /Users/vovs/Android/tmps/Robotium/app/build/intermediates/pre-dexed/test/debug/jaxb-api-2.2.7-5a4c4fa528666ece797bf985f28cd3e7059e62ce.jar /Users/vsvydenko/.gradle/caches/modules-2/files-2.1/javax.xml.bind/jaxb-api/2.2.7/2f51c4bb4724ea408096ee9100ff2827e07e5b7c/jaxb-api-2.2.7.jar
Error Code:
1
Output:
trouble processing "javax/xml/bind/annotation/adapters/CollapsedStringAdapter.class":
Ill-advised or mistaken usage of a core class (java.* or javax.*)
when not building a core library.
...
答案 0 :(得分:2)
我们还没有Robotium Allure适配器。你可以自己实现它。我们已经有了一个Java API,所以你需要的只是创建一个监听器。
您可以在此处找到更多信息:https://github.com/allure-framework/allure-core/wiki/Creating-Allure-Adapter