Why use JUnit for testing?

后端 未结 11 1454
忘掉有多难
忘掉有多难 2020-12-12 09:59

Maybe my question is a newbie one, but I can not really understand the circumstances under which I would use junit?

Whether I write simple applications or larger one

11条回答
  •  失恋的感觉
    2020-12-12 10:12

    The main advantage of JUnit is that it is automated rather than you manually having to check with your print outs. Each test you write stays with your system. This means that if you make a change that has an unexpected side effect your test will catch it and fail rather than you having to remember to manually test everything after each change.

提交回复
热议问题