Rigor in capturing test cases for unit testing

后端 未结 5 1164
没有蜡笔的小新
没有蜡笔的小新 2021-02-09 14:02

Let\'s say we have a simple function defined in a pseudo language.

List SortNumbers(List unsorted, bool ascending);
5条回答
  •  长情又很酷
    2021-02-09 14:36

    @Keith

    I think you nailed it, code coverage is important to look at if you want to see how "done" you are, but I think 100% is a bit unrealistic a goal. Striving for 75-90% will give you pretty good coverage without going overboard... don't test for the pure sake of hitting 100%, because at that point you are just wasting your time.

提交回复
热议问题