皮格拉德尔用于构建和测试Python项目。在gradle中,可以定义最小代码覆盖率百分比:
jacocoTestCoverageVerification { violationRules {violationRules{极限{最小= 0.5 }}规则{ enabled = false element = 'CLASS‘包括= ‘org.gradle.’限制{LINE= 'LINE’值= 'TOTALCOUNT‘最大值= 0.3 }
如果未达到此限制,则生成将失败。是否可以使用Pygradle定义最小的代码覆盖率?
当运行上述代码段时,构建将失败,并返回以下内容:
FAILURE: Build failed with an exception.
* Where:
Build file '/home/user/SomeProject/build.gradle' line: 14
* What went wrong:
A problem occurred evaluating root project 'SomeProject'.
> Could not find method jacocoTestCoverageVerification() for arguments [build_fsdafasdfsa] on root project 'SomeProject' of type org.gradle.api.Project.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2s
发布于 2018-04-27 16:38:27
目前,由于创建的票证仍然是打开的https://github.com/linkedin/pygradle/issues/184,因此不可能定义最小的代码覆盖范围。
https://devops.stackexchange.com/questions/3152
复制相似问题