dimitri.codes icon indicating copy to clipboard operation
dimitri.codes copied to clipboard

https://dimitri.codes/unit-testing-spring-boot

Open utterances-bot opened this issue 2 years ago • 4 comments

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

http://localhost:8000/unit-testing-spring-boot

utterances-bot avatar Mar 22 '22 10:03 utterances-bot

Test

g00glen00b avatar Mar 22 '22 22:03 g00glen00b

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....

maheshvarmasanga avatar Jun 17 '22 11:06 maheshvarmasanga

in the github there is no test code

maheshvarmasanga avatar Jun 17 '22 23:06 maheshvarmasanga

@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.

g00glen00b avatar Jun 21 '22 13:06 g00glen00b