Salesforce运行所有测试类并获取覆盖率报告

场景描述】:

#1. 假如系统除了自己写的代码外,还包含一些安装包,而我们仅需快速了解自定义部分代码的运行情况和覆盖率;
#2. 项目开发已经使用了vs code,想通过cli快速了解覆盖情况;
#3. 想通过第三方工具快速了解覆盖情况,并方便下载Excel来管理测试部分;

如果你有上面枚举的需求,这篇文章将帮到你。

方法】:force:apex:test:run

# Run all unit tests with code coverage statistics
sfdx force:apex:test:run -cy -l RunAllTestsInOrg -w 5 -r human

参考资料】:
https://skaruz.com/salesforce-how-to-get-the-code-coverage-of-a-class-org/
https://appexchange.salesforce.com/listingDetail?listingId=a0N3A00000EFoy9UAD
https://help.salesforce.com/articleView?id=000332406&type=1&mode=1
https://jayakrishnasfdc.wordpress.com/2018/12/28/test-code-coverage-of-salesforce-org-different-ways/
https://developer.salesforce.com/blogs/2020/04/salesforce-all-tests-execution.html
Code Coverage Report Generator

相关推荐
©️2020 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页