From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,595c75298fbdce96 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Is Aunit helpful? References: <8a1e58c0-2330-4475-8013-97df103dd85e@o19g2000yqb.googlegroups.com> <82r5ids1o9.fsf@stephe-leake.org> <20100805211820.52c18cb5.tero.koskinen@iki.fi> <8d166cfb-4850-42b6-ac25-d9ac00df7565@q35g2000yqn.googlegroups.com> <82ocd5wukf.fsf@stephe-leake.org> <3957496a-af4b-45f5-87c9-327b22d19f08@x21g2000yqa.googlegroups.com> Date: Sun, 15 Aug 2010 08:10:34 -0400 Message-ID: <82eie0vzyd.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (windows-nt) Cancel-Lock: sha1:2fkuFRgfT1bz4v0TuZGQYfUXulM= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 039764c67d95de029e66101039 Xref: g2news1.google.com comp.lang.ada:13333 Date: 2010-08-15T08:10:34-04:00 List-Id: Midoan writes: > On Aug 14, 6:57 am, Stephen Leake > wrote: >> "Yannick Duchêne (Hibou57)" 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. 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. Generating a scaffold that gives coverage could be useful, but it must be completed manually, to ensure correct results. -- -- Stephe