spoon github地址:
https://github.com/square/spoon
spoon主页: http://square.github.io/spoon/
spoon主页: http://square.github.io/spoon/
sample 地址: http://square.github.io/spoon/sample/index.html
将spoon项目下载下来后,进入spoon/website/sample目录,访问index.html即可看到示例
spoon的主要目的在于将能够将基于instrumentation的测试用例分发到各个不同的手机上,执行并将测试结果收集起来,生成最终的HTML总结报告。
spoon使用1:
spoon使用2:
java -jar E:\spoonApk\spoon-runner-1.1.10-jar-with-dependencies.jar --apk E:\spoonApk\ttdp-sign.apk --test-apk E:\spoonApk\TtdpApkTest.apk --output e:/aak
spoon生成的报告目录结构:
spoon详细参数:
Options:
--apk Application APK (待测应用apk)
--fail-on-failure Non-zero exit code on failure
--output Output path (报告路径)
--sdk Path to Android SDK
--test-apk Test application APK(测试应用apk)
--title Execution title
--class-name Test class name to run (fully-qualified)
--method-name Test method name to run (must also use --class-name)
--no-animations Disable animated gif generation
--size Only run test methods annotated by testSize (small, medium, large)
--adb-timeout Set maximum execution time per test in seconds (10min default)
注意1、由于spoon报告中的静态页面中使用的是googleapis中的在线字体,因此报告可能打开会相当慢
<link href="https://fonts.googleapis.com/css?family=Roboto:regular,medium,thin,italic,mediumitalic,bold" rel="stylesheet">
因此实际要做为报告时,建议翻墙后访问https://fonts.googleapis.com/css?family=Roboto:regular,medium,thin,italic,mediumitalic,bold,将字体文件下载下来保存至文件例如放至static/fonts.css,然后静态引用<link href="static/fonts.css" rel="stylesheet">
参考:http://www.mamicode.com/info-detail-466645.html