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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10f5bc,1d0b1da0843a9b79,start X-Google-Attributes: gid10f5bc,public X-Google-Thread: f43e6,1d0b1da0843a9b79,start X-Google-Attributes: gidf43e6,public X-Google-Thread: 103376,1d0b1da0843a9b79,start X-Google-Attributes: gid103376,public From: Andre Spiegel Subject: ANNOUNCE: `tg', a test driver generator for Ada programs Date: 1996/05/09 Message-ID: #1/1 X-Deja-AN: 153892740 distribution: world sender: spiegel@berlin.berlin.informatik.uni-stuttgart.de organization: University of Stuttgart, Germany newsgroups: comp.lang.ada,comp.software.testing,comp.software-eng Date: 1996-05-09T00:00:00+00:00 List-Id: `tg', a simple test driver generator for Ada programs, can now be found under the address ftp.informatik.uni-stuttgart.de:/pub/local/tg-3.0.tar.gz I wrote this little helper some time ago, found it pretty useful, and finally bundled it for release. What is `tg'? Here's an extract from the README file: --------------------------------------------------------------------------- tg is a program that helps testing software. If you want to test a piece of software, that normally means you have to execute it over and over again, passing various sets of input data to it, and verifying that it gives the correct results for each input. You normally write a program that does all this automatically. Such a program is called a "test driver". tg can generate such test driver programs, given a very succinct description of the individual test cases. tg translates this description into a complete Ada program. If you compile this test driver, link it with the software you want to test, and execute it, it performs all the test cases and tells you whether the software under test behaved as expected or not. tg is designed for the Ada programming language, but you can also use it for software written in other languages. You might even test binary programs with it, of which you don't have the source code at all. --------------------------------------------------------------------------- Here's a small example. Suppose you want to test an Ada function which counts the number of `&' characters within a given string. function Count_Ampersand (Str : in String) return Natural; One of your test cases might be to call it with parameter "abc&&&abc" and verify that the result is three. The code for this could look as follows. Put ("Testing three ampersands in the middle... "); begin Count := Count_Ampersand ("abc&&&abc"); if Count = 3 then Put_Line ("pass."); else Put_Line ("fail."); end if; exception when others => Put_Line ("fail."); end; That is a lot of code for a single test case. In `tg' notation, to specify this test case, you would just write: ***** Testing three ampersands in the middle... test Count := Count_Ampersand ("abc&&&abc"); pass Count = 3 The `tg' command translates this into code similar to that shown above and puts it into a complete driver program. --------------------------------------------------------------------------- `tg' is written in Ada 95 and compiles out-of-the-box with GNAT, the GNU Ada Compiler, version 3.01 or higher. Documentation is provided as a GNU texinfo manual, and in postscript form. `tg' is free software, released under the FSF's General Public License (GPL). Comments, suggestions, etc. are welcome. Andre Spiegel University of Stuttgart, Germany