How to do a meaningful code-coverage analysis of my unit-tests?

后端 未结 5 1271
别那么骄傲
别那么骄傲 2021-01-13 05:32

I manage the testing for a very large financial pricing system. Recently our HQ have insisted that we verify that every single part of our project has a meaningful test in p

5条回答
  •  无人及你
    2021-01-13 05:41

    FWIW, this is what we do. Since I don't know about your Unit-Test and Regression-Test setup, you have to decide yourself whether this is helpful.

    • Every Python package has UnitTests.
    • We automatically detect unit tests using nose. Nose automagically detects standard Python unit tests (basically everything that looks like a test). Thereby we don't miss unit-tests. Nose also has a plug-in concept so that you can produce, e.g. nice output.
    • We strive for 100% coverage for unit-testing. To this end, we use Coverage to check, because a nose-plugin provides integration.
    • We have set up Eclipse (our IDE) to automatically run nose whenever a file changes so that the unit-tests always get executed, which shows code-coverage as a by-product.

提交回复
热议问题