且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

针对不同输入数据的Java单元测试

更新时间:2023-11-16 22:00:46

发生对我来说,我发现这个叫做参数化测试的好主意,例如:
http://www.mkyong.com/unittest/junit-4-tutorial-6-parameterized-test/ 以这种方式
你可以用不同的参数进行所有相同的测试。

Happen to me sometime, and them I found this awesome idea called Parameterized Test, for instance: http://www.mkyong.com/unittest/junit-4-tutorial-6-parameterized-test/ in this way you can all the same tests couple of time with different argument.