JUnit tutorial for learning

2019-09-01 13:09发布

问题:

I want to learn JUnit from basic in Java and how to apply in my project. It would be very helpful if anybody can tell from where to start. I have seen some tutorial but i can't understand from it.

回答1:

You can write your test code before or after write your source code. You can read about Test-driven development process.

For learning JUnit testing this can help to you.

You will get more details about JUnit testing in the Book "Pragmatic Unit Testing in Java with JUnit".



回答2:

Also go through Dependency Injection and Inversion of Control They are pretty useful concepts to put into practice when one intends to do test driven development. There is a nice discussion about that also on stackexchange



标签: junit