₦airaland Forum

Welcome, Guest: Register • Login • With Google • Trending • Recent • New

Stats: 3,345,735 members, 8,519,136 topics. Date: Sunday, 15 November 2026 at 05:32 PM

Toggle theme

Why You Should Write Tests? - Programming - Nairaland

Nairaland Forum › Science/Technology › Programming › Why You Should Write Tests? (815 Views)

1 Reply

Why You Should Write Tests? by harryobas(op): 10:31am On Jul 26, 2018
Why Should You Write Tests?
Here’s why:

It builds a safety net against errors (especially useful for refactoring)
If you don’t have a test suite then you don’t want to touch your code, because of the fear of something breaking…

…having tests increases your confidence!

It helps document your code
Your tests describe what your application should be doing.

It gives you a feedback loop
When you are doing TDD you get a feedback loop that tells you what to focus on next, useful if you get distracted easily.

It helps you make sure your code is producing the results you expect
This one is important!

If you are writing some complex logic, then you want to make sure it’s working with many different inputs & not just with one example you came up with.

Tests can help you uncover corner cases & document them.

It helps you land a developer job
Most job applications will appreciate your testing skills, increasing your chances of landing the job.
1 Reply

Passing Remote Job Interview Tests and land high paying tech jobs • The 8 Tips For Improving Your Website Tests & Processes. • 2 • 3 • 4

React Native Vertical Scrollview Example Android • How To Increase Your Local Alexa Rank? • Free Live Tutorial On Web Programming In CORE PHP