comp.lang.ada
 help / color / mirror / Atom feed
From: Midoan <midoan.ses@gmail.com>
Subject: Re: Is Aunit helpful?
Date: Sun, 15 Aug 2010 14:47:21 -0700 (PDT)
Date: 2010-08-15T14:47:21-07:00	[thread overview]
Message-ID: <32dc1191-0a83-40ef-8bbc-a13a06f2167e@u26g2000yqu.googlegroups.com> (raw)
In-Reply-To: 82eie0vzyd.fsf@stephe-leake.org

On Aug 15, 1:10 pm, Stephen Leake <stephen_le...@stephe-leake.org>
wrote:
> Midoan <midoan....@gmail.com> writes:
> > On Aug 14, 6:57 am, Stephen Leake <stephen_le...@stephe-leake.org>
> > wrote:
> >> "Yannick Duchêne (Hibou57)" <yannick_duch...@yahoo.fr> writes:
>
> >> > About AUnit: just seen about what it is, how it is set up and how it
> >> > works. Seems a question is still pending : “how to be sure the test
> >> > cover  all relevant case ?”. I do not see a way to be sure testing
> >> > cover all  cases.
>
> >> Correct, AUnit does not do that. gcov does, although I have not used it
> >> very much. It can be difficult to use the output of gcov.
>
> >> > That is the main limitation of this kind of approach.
>
> >> What alternative approaches provide coverage information?
>
> > FYI, note that with Mika (http://www.midoan.com/), the automatic test
> > data  generator for Ada, it is possible to take in your existing test
> > cases, check the coverage achieved, and automatically generate missing
> > test inputs and expected test result
>
> How can a tool possibly generate expected results? If it reads the code,
> it can only generate the results that the code _will_ produce. But
> that's the opposite of a test; the expected results are what the code
> _should_ produce, based on some other spec (not the Ada spec). A testing
> process _must_ assume the code is wrong.

Yes of course you are right; and that's what we meant. What we meant
was that the code's result must always be validated externally of the
tool. Mika will simply ask the question "given these inputs, are those
expected outputs?". Those outputs, that Mika generates, will be
according to the code under test: it will include all side effects
(i.e. including non local variables changes) ... In our experience,
Mika will flag many side effects not necessarily intended by the
developers, never mind the designers ... If the code's outputs is
however confirmed by the human oracle then it can join a set test
cases suitable for regression testing. If the code is subsequently
changed then Midoan can flag changed behavior and/or complete the test
inputs set; thus being much useful during developement, maintenance
(i.e. regression) testing.

> If the spec is machine readable, then the tool has a chance. But I see
> no mention of machine readable specs on the midoan site.
>
> Hmm. If the Ada spec includes pre/postconditions (Ada 2012), then some
> meaningful tests can be generated, but the compiler will already do
> that.
>
> > (which can be validated to form new test cases automatically).
>
> validated by what? If that means "reviewed by a human", that might be
> ok. But there would be a very strong temptation to say "the tool must be
> right".
>
> > This can be done to achieve branch, decision or MC/DC coverage as
> > desired.
>

We are very open to inquiries about machine readable, commercially
sustainable (preferably!), specification languages as used in
combination with Ada (any specification language based on Ada's syntax
is particularly welcome :-) ). In fact disproving specified behavior
would be a very attractive proposition for us ... But, in our
experience, most specifications (and that includes code generated (!)
specifications used by fashionable model based verification techniques
as provided by Polyspace and such like) only capture a fraction of the
code's behavior; e.g. not all packages' variables are modeled. In
practice, and for example, Ada 2012's post-conditions are unlikely to
be used to capture the full effect of commercial, safety critical,
code ... That, to our eyes, is a major weakness in specification based
verification : the specification may say 'A' but the code may do 'A
and B' ... and trying to model 'B' in the specification typically
leads to  specifications as complex as the code!

So we, as a gist conclusion, at Midoan, still believe in the primacy
of human checked, tool assisted, systematic software testing.

> Generating a scaffold that gives coverage could be useful, but it must
> be completed manually, to ensure correct results.
>

Agreed, indeed.

> --
> -- Stephe

Regards,
The Midoan Team at http://www.midoan.com/



  reply	other threads:[~2010-08-15 21:47 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-04 14:19 Is Aunit helpful? Ada novice
2010-08-05 12:07 ` Stephen Leake
2010-08-05 17:29   ` Ada novice
2010-08-05 18:18     ` Tero Koskinen
2010-08-05 20:39       ` Ada novice
2010-08-05 20:57         ` Simon Wright
2010-08-13 16:43         ` Yannick Duchêne (Hibou57)
2010-08-13 19:34           ` Simon Wright
2010-08-13 20:59             ` Yannick Duchêne (Hibou57)
2010-08-14  6:57           ` Stephen Leake
2010-08-14 13:38             ` Yannick Duchêne (Hibou57)
2010-08-14 21:33             ` Midoan
2010-08-14 21:38               ` Yannick Duchêne (Hibou57)
2010-08-14 21:49                 ` Simon Wright
2010-08-14 22:04                   ` Yannick Duchêne (Hibou57)
2010-08-15  7:57                 ` Midoan
2010-08-15 11:46                   ` Simon Wright
2010-08-15 12:10               ` Stephen Leake
2010-08-15 21:47                 ` Midoan [this message]
2010-08-15 22:58                   ` Yannick Duchêne (Hibou57)
2010-08-17  2:46                     ` Randy Brukardt
2010-08-17 12:37                       ` Cyrille
2010-08-20  9:22                         ` Yannick Duchêne (Hibou57)
2010-08-20  9:20                       ` Yannick Duchêne (Hibou57)
2010-08-16  7:59                   ` Stephen Leake
2010-08-16  9:02                     ` Midoan
2010-08-26 17:45                       ` Colin Paul Gloster
2010-08-07 16:57       ` Marco
2010-08-13 14:09       ` Yannick Duchêne (Hibou57)
2010-08-05 20:48     ` Simon Wright
2010-08-06  9:06       ` Ada novice
2010-08-06 16:51         ` Simon Wright
2010-08-06 18:13           ` Ada novice
2010-08-08 13:39 ` John McCormick
2010-08-08 17:10   ` Ada novice
2010-08-09 17:05     ` John McCormick
2010-08-09 17:23       ` Michael R
2010-08-10  8:33         ` Ada novice
2010-08-10 13:48           ` John McCormick
2010-08-10  9:45       ` Mark Lorenzen
2010-08-10 14:07         ` John McCormick
2010-08-10 17:32       ` Ada novice
2010-08-12 15:04         ` John McCormick
2010-08-17 15:51           ` Ada novice
2010-08-13 15:31 ` Yannick Duchêne (Hibou57)
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox