简体   繁体   English

用于行为测试框架的测试覆盖工具

[英]Test coverage tool for Behave test framework

We are using Behave BDD tool for automating API's. 我们使用Behave BDD工具自动化API。 Is there any tool which give code coverage using our behave cases? 是否有任何工具使用我们的行为案例来提供代码覆盖?

We tried using coverage module, it didn't work with Behave. 我们尝试使用覆盖模块,它不适用于Behave。

You can run any module with coverage to see the code usage. 您可以运行任何带覆盖的模块来查看代码使用情况。 In your case should be close to coverage run --source='.' -m behave 在你的情况下应该接近coverage run --source='.' -m behave coverage run --source='.' -m behave

Tracking code coverage for Aceptace/Integration/Behaviour test will give a high coverage number easily but can lead to the idea that the code are properly tested. 跟踪Aceptace / Integration / Behavior测试的代码覆盖率将很容易提供高覆盖率,但可以导致代码经过适当测试。

Those are for see things working together, not to track how much code are well 'covered'. 这些是为了看到合作的东西,而不是跟踪有多少代码被“覆盖”。

Tying together unittests and coverages makes more sense to me. 将单元测试和覆盖范围结合在一起对我来说更有意义。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM