Browse Prior Art Database

Test Case Source Code Generator

IP.com Disclosure Number: IPCOM000107263D
Original Publication Date: 1992-Feb-01
Included in the Prior Art Database: 2005-Mar-21
Document File: 2 page(s) / 81K

Publishing Venue

IBM

Related People

Lahman, BA: AUTHOR [+2]

Abstract

Disclosed is a method to test Application Programming Interfaces (APIs) that uses the same test case variation input to generate test cases in multiple languages. The test case source code generator reads a test case variations file and assembles pre-written code segments into a compilable test case by making substitutions in the code segments based on the contents of the test variations file. By using a set of code segments in a different language, the same test case variations file can be used to generate test cases in different languages.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Test Case Source Code Generator

       Disclosed is a method to test Application Programming
Interfaces (APIs) that uses the same test case variation input to
generate test cases in multiple languages.  The test case source code
generator reads a test case variations file and assembles pre-written
code segments into a compilable test case by making substitutions in
the code segments based on the contents of the test variations file.
By using a set of code segments in a different language, the same
test case variations file can be used to generate test cases in
different languages.

      In API test cases, a program call is made that will usually
contain a number of parameters, for example,
APICall1(parm1,parm2,parm3).  Testing the API involves trying
different values for the parameters.  A different test program is
written for each scenario.  This is time- consuming and repetitious
work that is prone to errors.

      Instead of writing the test programs manually, the test case
source code generator automates the task writing of the test
programs.  By using a modular approach, testing can be done on
different operating systems (OS/2*, VM, OS/400*) with no changes to
the test case variations file or code segments.  Operating system
differences required in test case code is handled by the test case
source code generator. Also, the test case source code generator is
readily adaptable for testing API calls in different languages, such
as C, COBOL, RPG, just by using a different set of code segments.
Maintenance of the test programs is greatly improved.  If a global
change is required by many or all test programs, that change can be
made in one place and then new test cases regenerated.

      The test case source code generator consists of three parts:
      1.   A file containing the test scenarios, i.e.:
                                     APICall1 APICall2
Test Case  Call Order        Parm1   Parm2  Parm3  Exp_rc P...