lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Tue, Aug 23, 2016 at 9:43 AM, Sean Conner <> wrote:
>   And I'm *still* puzzled at what a testing framework *buys* you.

The comparison to logging is actually fairly apt.

For the simple cases, you don't need a fancy logger, just like you
don't need a fancy test runner.

But there comes a time when you want to run just one test out of your
whole suite, or when you want to be able to have your test suite
continue running after one test has failed, or when you want to be
able to format your test output in a useful way, or when you want to
improve your test isolation, or when you want to dummy in some
components that can't be autotested hermetically, or when you want to
monitor performance regressions, or when you want to collect
statistics... Well, sure, most of these can be written yourself, but
the biggest advantage of using an existing test framework, especially
a lean, mature one, is that you gain the benefits of the test
framework's development history.

In that sense, it's just like a library. The core reason to use it is
saving time and improving correctness. You're not spending your time
writing the code yourself, and it's less likely to have bugs in it (by
virtue of someone else having already iterated over it a lot) than
stuff you hack up for yourself.

/s/ Adam