dimitri.codes
dimitri.codes copied to clipboard
https://dimitri.codes/unit-testing-spring-boot
Unit testing your Spring boot applications | Dimitri's tutorials
Testing is an important part of development, and in this tutorial I'll show you how you can unit test your Spring boot application
Test
Good article! is it good to write unit tests after the development is done? is it good idea? in our project someone else has written code and I have been tasked to write unit tests....
in the github there is no test code
@maheshvarmasanga
Good article! is it good to write unit tests after the development is done? is it good idea? in our project someone else has written code and I have been tasked to write unit tests....
Unit tests should be written by the person who knows the best what that code should do, so the developer who wrote the code.
If you have to write unit tests now, how will you know what the right behaviour is? If you ask me, there are two answers to that, either you have some very detailed documentation (which I assume is unlikely), or you write your unit tests based on what the code does. If you choose the latter, then if the code contains a bug, so will your unit test.
in the github there is no test code
Yeah sorry, I was hoping to finish everything before the time this article was published, but I didn't make it. I'll try to push them as soon as I can.