Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问UnitAuto能生成测试报告和代码测试覆盖率吗? #23

Open
winner-huang opened this issue Jan 6, 2023 · 2 comments
Open
Labels

Comments

@winner-huang
Copy link

请问UnitAuto能生成标准的测试报告和代码测试覆盖率吗?

@TommyLemon
Copy link
Owner

TommyLemon commented Jan 6, 2023

自带测试报告和覆盖率统计
image

image

不过如果要生成 Jacoco 等主流的报告和覆盖率,目前需要改源码来实现

@TommyLemon
Copy link
Owner

TommyLemon commented Apr 6, 2023

@winner-huang
不用改源码了,使用 Jacoco on-the-fly 模式即可。

5.如何统计行覆盖率/分支覆盖率?
Java/Kotlin 可以用 Jacoco(on-the-fly 运行时动态插桩模式)
https://www.jacoco.org/jacoco/trunk/doc/agent.html
https://www.jacoco.org/jacoco/trunk/doc/cli.html

还可以搜索并参考 "Jacoco" 相关文章,例如:
Java 覆盖率 Jacoco 插桩的不同形式总结和踩坑记录
https://testerhome.com/topics/20632

https://github.com/TommyLemon/UnitAuto#%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants