weixin_39746229
2021-01-03 03:56 阅读 0

Specifying threshold level for each threshold type.

Threshold command-line option /P:Threshold seems to use a single value for all threshold type. I would like to specify different threshold level for each threshold types.

like 100% method but give like 50% branch for ex.

/p:Threshold=\"50,100\" /p:ThresholdType=\"branch,method\"

But this doesnt work, it throws error


.... error : The minimum branch coverage is below the specified 50100  ....
.... error : The minimum method coverage is below the specified 50100 ....

 > coverlet --version
Cross platform .NET Core code coverage tool
1.5.0.0
 > 

该提问来源于开源项目:coverlet-coverage/coverlet

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

5条回答 默认 最新

  • weixin_39635459 weixin_39635459 2021-01-03 03:56

    Confirm at the moment we use only single value https://github.com/tonerdo/coverlet/blob/226455ece9760c72d3d09ca6c377efb8cb61d686/src/coverlet.core/CoverageResult.cs#L164

    点赞 评论 复制链接分享
  • weixin_39746229 weixin_39746229 2021-01-03 03:56

    Created a pull request for this option

    https://github.com/tonerdo/coverlet/pull/385

    点赞 评论 复制链接分享
  • weixin_39747755 weixin_39747755 2021-01-03 03:56

    I would also like to request this feature. It would be very valuable for me to have, since my team has specified a minimum test coverage for both lines and branches (with different percentages for each type).

    点赞 评论 复制链接分享
  • weixin_39635459 weixin_39635459 2021-01-03 03:56

    cc: https://github.com/tonerdo/coverlet/pull/385#issuecomment-515797242

    点赞 评论 复制链接分享
  • weixin_39838798 weixin_39838798 2021-01-03 03:56

    I would also find this feature very useful.

    点赞 评论 复制链接分享

相关推荐