Re: Test first as specification



Lurker wrote:

> "Robert C. Martin" <unclebob@xxxxxxxxxxxxxxxx> wrote in message
> news:akkcf1d223tg2v6983f4nsmigirblqrht5@xxxxxxxxxx

>> I completely disagree. Specifications are highly detailed declarative
>> statements that do not include intent. Intent is always commentary.

> Let me see if I got it right. Acording to you, specifications
> do not include intent? So what are they for then? I mean,
> the whole point of the specs is to communicate the intent,
> isn't it?

This is for Lurker, and also for Daniel Parker and Dmitry Kazakov :

We have SPEC, which is a specification of something for which an
implementation IMPL is required. We have TEST, which is a set of
tests that attempt to show that IMPL conforms to SPEC.

The premise is that there is a function f such that :

1. f(SPEC) = TEST

Succinctly, f allows the derivation of a set of tests from a spec.


2. Now what we continually hear from the XP/TDD is :

The tests are the specification.


3. From 1, 2 implies (SPEC = TEST)

4. Lurker IMHO is asking the following question :

Given f-inverse(T) = S, SPEC = some programming language,
show us the elements of TEST such that we can determine whether
f-inverse(TEST) = SPEC.


Given that a programming language may be too complex for debate,
what example would someone suggest ??

Late last yr I proposed the game of Go, where I would write SPEC
(using mathematical techniques) for the game, and an XP bod would write
TEST as "customer" tests. The premise being that what was specified/
omitted/incorrect using either approach could be scrutinised. That one
soon went quiet.

Shall we be topical, and chose something like Depth First Search of
directed graphs ??

Something else ?? I (and no doubt others) will be open to offers.


Regards,
Steven Perryman

PS: I have more interest than others in SPEC and f, because it is
the basis of the specification-directed testing method. Similarly for
f-inverse (Design for Testability) , because it leads to the creation
of output-independent test infrastructure.

.



Relevant Pages

  • Re: Test first as specification
    ... Specifications are highly detailed declarative ... Intent is always commentary. ... the point of a spec is to communicate desired behavior. ... "The aim of science is not to open the door to infinite wisdom, ...
    (comp.object)
  • Re: The birth of General Relativity
    ... What actual GPS spec are you hallucinating about? ... Demanding to see "the specifications" is disingenuous of you, ... As an INTERFACE Control Document, ... to lock a voltage controlled crystal oscillator (VCXO) to ...
    (sci.physics.relativity)
  • Re: The birth of General Relativity
    ... What actual GPS spec are you hallucinating about? ... Demanding to see "the specifications" is disingenuous of you, ... As an INTERFACE Control Document, ... to lock a voltage controlled crystal oscillator (VCXO) to ...
    (sci.physics.relativity)
  • Re: Ive thought better of Linux
    ... > |> when described within a formal spec. ... classify specifications as horse-based and camel-based to destinguish ... Tim Cross ... My real e-mail is ...
    (comp.lang.lisp)
  • Re: Why doesnt the standard allow reuse of arguments in printf() ?
    ... there's example on the POSIX fprintf() page that demonstrates ... specifications turn out to specify different types -- I presume it produces ... Just out of curiosity, what is that other spec, if that's not a secret? ... you've got me wondering a) why Posix is deviating from the Open Group, ...
    (comp.std.c)