DEV Community

Discussion on: Introduction to testing with Python for beginners

Collapse
ivanalejandro0 profile image
Ivan Alejandro Author

Oh, no worries, I appreciate the question.

You're right about pointing out that it's more code, and that's actually something very important to have in mind because it's more code that has to be maintained and made sure it tests what we want to test.

The debugger is a very important tool, but is used to solve a different problem than tests.
You usually would use the debugger to run your application step by step, to help you figure out where a bug might be, check variable values on those steps and so on.

I think that the most important difference is that you can run your app manually or you can use the debugger, but you would check one use case at the time, with tests you can check many many use cases very quickly.

Manually you would check for one scenario, then another, and then another... Using tests you would define those scenarios beforehand, and then check all of them at once, as many times as you want.

So, tests do something you couldn't do manually or the debugger, verify a lot of cases in a fraction of the time :)

Hopefully this explanation helps.
If this still doesn't make much sense let me know.

Collapse
harleendev profile image
Harleen 🏳️‍🌈

Thanks, that makes sense!