Re: [ANN] Looking for new LuaJIT maintainers

  • From: Coda Highland <chighland@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Sat, 15 Aug 2015 12:31:08 -0700

On Sat, Aug 15, 2015 at 10:23 AM, Florian Weimer <fw@xxxxxxxxxxxxx> wrote:

* Vyacheslav Egorov:

Florian Weimer <fw@xxxxxxxxxxxxx> wrote:
but it doesn't require knowledge of LuaJIT internals.

I was specifically writing about harvesting test cases (with
permission) from the mailing list archives.

Actually writing a good test suite *does* require a deep understanding
of internals because otherwise you can never ensure good coverage for
all corner and not-so-corner cases.

That's the old debate of blackbox vs whitebox testing.


Which is, of course, answered by "you need both."

You have integration testing, which ensures that the exposed API obeys
its contract. These can be served by black-box tests. If you change
something inside the code (inside the black box) then these tests
should not fail, unless you also change the contract (which means
acknowledging a compatibility break).

And then you have unit testing, which ensures that the internal
details are correct. These must be served by white-box tests. If you
change something inside the code, then these tests might need to be
updated, because the internal behaviors might change (e.g. due to a
refactoring) without changing the external behavior.

A good test suite should have both.

The assertion that a good test SUITE needs a deep understanding of the
internals is true -- but that doesn't mean that you can't write good
TESTS without that understanding. Black box tests are still useful,
even if they're not a complete solution by themselves.

/s/ Adam

Other related posts: