₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,794 members, 8,423,766 topics. Date: Wednesday, 10 June 2026 at 09:15 AM

Toggle theme

Why You Should Write Tests? - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingWhy You Should Write Tests? (803 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 jobsThe 8 Tips For Improving Your Website Tests & Processes.234

Crypt0 Mining Site For SaleProgramming AppFree Website Audit For The 1st 50 People