Why Test
Catch bugs before users do.
Why Test at All
Automated tests are code that checks your code. Instead of manually running a program and eyeballing the output, you write small assertions that the test runner verifies for you.
For Lua, the most popular framework is busted. It gives you a clean syntax for describing behavior and reporting pass or fail results.
The Cost of No Tests
Without tests, every change is a gamble. You fix one bug and silently break another. As a codebase grows, manual checking becomes impossible to do thoroughly.
Tests act as a safety net. When you refactor, a green test suite tells you the behavior is preserved.