Method for automated software application testing5740408Abstract A method for automatically testing a software program; which is provided with a TEST DATA file including all data to test the functions of the program, a SCREEN FIELD MAP file including screen field marks such as field number, title, screen position, etc. and an INTER-SCREEN NAVIGATION file for describing inter-screen relations, includes the following steps: identifying the screens needed for the test data, getting the identified screens, carrying out the tests and logging all discrepancies. Claims We claim: Description The present invention relates to tests of a software application in general, and in particular to a method for automated software application testing with relational data base.
__________________________________________________________________________
COMMAND ACTION
__________________________________________________________________________
Direct COMMANDS
1-Key-in `x` on the SOURCE SCREEN
2-`Enter`key
*PFk
1-PFk key
Selection COMMANDS
*K
1-Key-in the key data of the test step on the SOURCE SCREEN
2-`Enter` key
*Ki
1-Selects, on the SOURCE SCREEN, the record with the key data
of the test step, and marks it with `i`
2-`Enter` key
Input COMMANDS
1-Inputs, on the SOURCE SCREEN, the non-key data of the test step
2-`Enter` key
Other COMMANDS
*S
1-Key-in the key data of the test step on the SOURCE SCREEN
2-Inputs, on the SOURCE SCREEN, the non-key data of the
test step
3-`Enter` key
C1(C2
1-any above command C1
2-any above COMMAND C2
ex: *K(*S
ex: *Ki(*Pfk
__________________________________________________________________________
TEST DATA running FIG. 4 shows the architecture of the method according to the invention. All files and programs are in a workstation connected to the software application. Hereunder are listed parts of programs included in the logic of the method according to the invention for automation of one test step. The used Program Design Language allows the man skilled in the art to understand the invention. Usual sequences as chaining of test data, error management, etc. are not described. The following definitions are provided for a better explanation: Definitions
______________________________________
Test Step Group of data for an elementary ACTION: CREATE
or READ or MODIFY, etc (see Fig.1)
Entrance Screen
The first screen of the application
Current Screen
The screen where the application stands
Prior Screen
The current
screen, before starting a new Test Step
Objective Screen
One or several screens are needed to key-in
the Test Step data: the last one
is called the `Objective Screen`
Ultimate Screen
The screen after the Test Step is over
Forward Path
When the application calls new screens, it's
on the `Forward Path`
Backwards Path
When the application returns to previously called
screens it is on `Backwards Path`
Cross Screen
The screen as the crossing of `Backwards Path`
and the `Forward Path`
Key Field A field which is a selection field of the
relational data base
Forward Path
File saving all
Non mandatory
the Key Fields with their TEST DATA
key work file
for the `Forward Path` linking the
Entrance Screen and the Current Screen
______________________________________
Thus, according to the invention, a call is successively made to three computer programs: TEST DATA Collect, PATH SEARCH, and TEST STEP EMULATION. They are listed below in a high level language that can be understood by the man skilled in the art. Comments are imbedded between /* and */ for an even better understanding. TEST DATA Collect Its object is to collect useful data for the Test Step and save them in a STEP DATA work file (See FIG. 5: `K` being the index for Key Field, `M` the index for mandatory Key Field, `Objective.sub.-- Screen` an index for the Objective Screen, and `ll.sub.-- cc` a screen position).
______________________________________
/*Collect TEST DATA */
>Read the next Test Step in the TEST DATA file
>Write to STEP DATA work file
ACTION Code,
all Key Field names, their related data and the index K
all non-Key Field names and their related data
/* Add Screen names and Marks for non-Key Field names */
>Do For every composite key (ACTION Code / Non-Key Field name)
>Read the SCREEN FIELD MAP file
>Write the screen name and Mark to STEP DATA work file
for the related
composite (ACTION Code / Non-Key Field name)
/*the Mark here is ll.sub.-- cc*/
>Enddo
>Define Objective Screen = the last screen name, for the Read step above
/*Define mandatory Key Fields */
>Do for every composite key (Key Field name / data) of
STEP DATA work file
>IF not in the Forward Path Non Mandatory Key work file:
/* this file is detailed with routinc 3 */
>Write in the STEP DATA work file an index M for related
composite (Key Field name / data)
>Endif
>Enddo
______________________________________
An example of STEP DATA work file is the following:
______________________________________
MODIFY
K Company XYZ
K M Serial N.cent.
12345
Address BORDEAUX SCR342 05 13
Objective.sub.-- screen: SCR342
______________________________________
PATH SEARCH Its object is to search the path needed for the Test Step. It links Prior Screen, Cross Screen, Objective Screen and Ultimate Screen, and makes up a PATH work file as seen FIG. 6. It is made up of five routines as follows: Routine 1 consists in searching a Forward Path between the Objective Screen and the Entrance Screen, and saving it in the PATH work file:
______________________________________
>Initial condition: TARGET SCREEN = Objective Screen
>Do while TARGET SCREEN not equal to Entrance Screen
>Read the INTER-SCREEN NAVIGATION file for the composite key
(MOTION = `FORWARD`/ TARGET SCREEN)
>Write the record to PATH work file
>TARGET SCREEN = SOURCE SCREEN, from the above record
>Enddo
>Call the subroutine: MKF (for: Mandatory Key Field) CHECKING,
>If the MKF CHECKING is KO: search another path, i.e. restart routine
______________________________________
The logic towards finding other paths is not part of the present invention. Routine 2 allows to search the Ultimate Screen:
______________________________________
/* If the ACTION Code is passive (such as READ) there is no
MOTION */
>If ACTION Code = READ
>WRITE to PATH work file the following record
(SOURCE SCREEN = Objective Screen and COMMAND = READ)
>Endif
/* Search for active ACTION Code (such as CREATE, MODIFY) */
>If ACTION Code = CREATE or MODIFY
>Read the INTER-SCREEN NAVIGATION file for the composite key
(SOURCE SCREEN / COMMAND) = (Objective Screen / *S)
>Write the record in PATII work file
>Endif
/* Search for ACTION Code which are result such as PRINT, DELETE */
>If ACTION Code = PRINT or DELETE
>Read the INTER-SCREEN NAVIGATION file for the composite key
(SOURCE SCREEN / response) (Objective Screen / ACTION Code)
>Write the record in PATH work file
>Endif
______________________________________
Routine 3 allows to update a Forward Path Non Mandatory Key work file:
______________________________________
>Build up the list of screens of the following path:
>If the Ultimate Screen is reached with the MOTION `Forward`:
take the Forward Path defined at the end of the Routine 2 by the
PATH work file.
>If the Ultimate Screen is reached with the MOTION `Backwards`:
take the Forward Path (defined at the end of the routine 2 by the
PATH work file) between the Entrance Screen and the Ultimate Screen.
>Do For all the Key Field names of the above screen list
>WRITE the Forward Path Non Mandatory Key work file with
(Key Field name and its data used in the Test Step)
>Enddo
______________________________________
Routine 4 allows searching the Backwards Path between the Prior Screen and the Cross Screen. Save in the PATH work file:
______________________________________
>Initial condition: SOURCE SCREEN = Prior Screen
>Do until crossing the Forward Path (i.e. until Cross Screen)
>Read the INTER-SCREEN NAVIGATION file for the composite key
(MOTION = `BACKWARDS` / SOURCE SCREEN)
>Write the record to PATH work file
>SOURCE SCREEN = TARGET SCREEN
>Enddo
______________________________________
Routine 5 sets the path for the Test Step:
______________________________________
>Set the PATH work file in the same order as the screens passes:
>Backwards Path
>Forward Path between the Cross Screen and the Objective Screen
>Call the subroutine: MKF CHECKING,
>If the MKF CHECKING is KO: search another Backwards Path
(i.e. restart at routine 4, after refreshing the PATH work file in the
status of the Routine 4 beginning)
______________________________________
The logic towards finding other paths is not part of the present invention. The subroutine: MKF Checking, has as an object to check whether each mandatory Key Field name of STEP DATA work file has an input in the path described in PATH work file:
______________________________________
>Do for each mandatory Key Field name of STEP DATA
>Check the link between records of the 2 files
SCREEN FIELD MAP file Path file
Field name = mandatory Key Field name
ACTION Code = `KEY`
Screen name = Screen name
>Enddo
______________________________________
TEST STEP EMULATION Its object is to emulate the terminal from the PATH work file. It is to be noted that the following explanation is valid for ONE Test Step. Keying-in is at this point related to a COMMAND code according to explanation with respect to FIG. 3 above.
______________________________________
>Initial condition: the application is at the Current Screen = Prior
Screen
>READ sequentially the PATH work file to get COMMAND and
TARGET SCREEN
>If the COMMAND = a Selection COMMAND (*K or *Ki)
>Do until end of file
>Read SCREEN FIELD MAP file for the composite key
(screen name / ACTION Code) = (Current Screen / `KEY`)
to get the Mark and the Field name
>Emulation: Set the cursor for the Mark
>Read the STEP DATA work file for the Field name to get the data
>Emulation: key-in the data
>Enddo
>Emulation: `Enter` key
>If COMMAND = *Ki: key-in `i` on the index zone then `Enter`
>Call routine: Screen Identification Checking for TARGET SCREEN
>Endif
>If COMMAND = an Input COMMAND (such as *S)
>Do until end of file
>Read sequentially STEP DATA work file for screen name =
Current Screen
to get Mark and data
>Emulation: Set the cursor for the Mark and key-in of the data
>Enddo
>Emulation: `Enter` key
>Call routine: Screen Identification Checking for TARGET SCREEN
>Endif
>If COMMAND = a Direct COMMAND (such as x or *PFi)
>Emulation: Key-in (x plus `Enter`) for COMMAND x,
or key-in PF-key according to *PFi
>Call routine: Screen Identification Checking for TARGET SCREEN
>Endif
>If COMMAND = Passive COMMAND (such as READ)
>Do until end of file
>Read sequentially STEP DATA work file for screen name =
Current Screen
to get Mark and data
>Emulation: Set the cursor for the Mark and read
>Compare reading with data
>If comparison is not OK: log a message
>Enddo
>Endif
______________________________________
A routine allows Screen Identification Checking:
______________________________________
>Initial condition: TARGET SCREEN name
>Check the identification of the Current Screen (it can be the screen
name)
>If not OK
>Log a message
>Synchronize by emulation of backwards PFkey until a known screen
/*In the present embodiment, synchronization is at the Entrance Screen*/
>Endif
______________________________________
The man skilled in the art will appreciate that some variations can be implemented such as multiple available paths, checking of messages, etc. without departing from the scope of the present invention.
|
Same subclass Same class Consider this |
||||||||||
