What Is Manual Testing?

This is a critical building block when it comes to testing your Spring Boot apps (and really any apps), so let's knock this out quick.

1. I know what manual tests are, and they aren't code, so what do you mean here?

The standard concept of manual testing is actually exploratory testing. This has changed recently due to increased automation. A quick story that relates this:

I used to work at Microsoft on the Zune. [Insert Zune joke here]. When we were starting to build the device and software, most of the testing was manual. There was a team of about 10 folks (me included) who's primary job it was to test new features and updates manually using written scripts - step-by-step tests. However, at the same time the team was also building out an automation platform to interact with the device directly.

This is probably where you are: direct (white box) interaction with software so you can write tests that exercise the code directly. Early at Zune we didn't have that, so nearly everything (outside of unit tests) was manual. This included both written, planned, defined tests AND exploratory testing.

The standard in the industry now is to only leverage the valuable man-hours for exploratory manual testing. Your time is just too important to spend most of it manual testing. So why is it so important?

A manual test, in this context, is a small piece of code that exercises something in your application that is otherwise hard to test. Sending emails is a great example. Perhaps you have a legacy application that integrates tightly with an email sending integration. You want to make a change to this area of the code, but can't be sure what you are changing is right. But, standing up the whole application and hitting this particular scenario (whatever it might be) is slow, difficult, and/or not possible.

Here's where you create a test that is meant to do this for you. Create a test around the smallest viable part of your application that will show you want you need to see. Your change is correct and works.

2. Why is manual testing so important?

It is mostly useful with refactoring or updating a legacy application, but it can also help you validate your understanding. Spring is a great example: sometimes you are pretty sure you understand how a part of Spring works, but want to be sure. Create a quick manual test around it and see what happens.

This method allows you to poke at your application from the outside, essentially like black box testing, but only to understand it. Understand the logic, or the state of the app, or the data that is present for the app.

Manual testing in this way is a shortcut that helps you work faster. Instead of long dev-deploy cycles, you can find out quicker if you are correct and if you understand.

3. Why not just create an integrated test?

Integrated tests are sort of a permanent version manual tests. Still code and commit manual tests like you usually do, but make sure they aren't included in your builds. Manual tests have side effects that you don't want running regularly, like sending real emails.

Once you figure out what you need to know by using a manual test, refactor or fix or build on top of your app then write an integrated or unit test. These are the permanent fixtures that come out of using a manual test.

Whew, now that you got that out of the way, check out the other types of testing you should be doing in Spring Boot.

Thanks for reading and I hope this was helpful!

Comments powered by Talkyard.