Unit testing introduction

What are unit tests?

Unit tests are the smallest part of the application that can be tested and are tested in parts.

Why should I care?

Unit tests are important to show if parts of an application are working in the way they are expected to work. For example, if you had a method called int return4() and you expected 4 to be returned, a unit test is written to validate the method returns 4. If it doesn’t, the test fails and is shown up to the tester if written well.

Where can I start unit testing?

For Spring Boot applications, I would recommend the following tutorial. This integrates a unit test with Spring Boot. I would advise you experiment with the tests and see what you can make.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s