About test presence
lex at cc.gatech.edu
Mon Dec 22 04:47:22 UTC 2003
"German Morales" <germanmorales at delta-sys.com> wrote:
> As you say, there are tests that test "the requirements for the software".
> These tests, if I understand what you mean, see the application as a
> whole, as the user will see it.
> The problem I see with this high level tests is that you need a fully
> working (part of the) application to have those tests passing.
> While making those tests work, you incrementally build smaller parts that
> you later join. Being test infected, you want to be sure that those
> smaller parts work perfectly, so you end up writing tests that are closer
> to the implementation.
Actually, you can use this kind of tests on small portions of the
program, too -- and I do so quite a lot. For example, you can write
this test down:
self should: [ 'http://www.squeak.org' asURL schemeName = 'http' ]
Or this one:
self should: [ #(1 3 5 2 4) asSortedArray = #(1 2 3 4 5) ]
In both cases, the tests are requirements-driven and you don't know what
classes are involved, but also in both cases it is probably a smallish
amount of code involved.
Requirements-driven tests rock, so tool writers, please keep them in
More information about the Squeak-dev