Unit Test Case Preparation Guidelines

The following are the suggested action points based on which a test case can be derived and executed for unit testing.

# Test case action which acts as input to the AUT

1. Validation rules of data fields do not match with the program/data specification.
2. Valid data fields are rejected.
3. Data fields of invalid class, range and format are accepted.
4. Invalid fields cause abnormal program end.

# Test case action point to check output from the AUT

1. Output messages are shown with misspelling, or incorrect meaning, or not uniform.
2. Output messages are shown while they are supposed not to be; or they are not shown while they are supposed to be.
3. Reports/Screens do not conform to the specified layout, with misspelled data labels/titles, mismatched data label and information content, and/or incorrect data sizes.
4. Reports/Screens page numbering is out of sequence.
5. Reports/Screens breaks do not happen or happen at the wrong places.
6. Reports/Screens control totals do not tally with individual items.
7. Screen video attributes are not set/reset as they should be.

# Test case action points to check File Access

1. Data fields are not updated as input.
2. “No-file” cases cause program abnormal end and/or error messages.
3. “Empty-file” cases cause program abnormal end and/or error messages.
4. Program data storage areas do not match with the file layout.
5. The first and last input record (in a batch of transactions) is not updated.
6. The first and last record in a file is not read while it should be.
7. Deadlock occurs when the same record/file is accessed by more than 1 user.

# Test case action points to check internal Logic of the AUT

1. Counters are not initialized, as they should be.
2. Mathematical accuracy and rounding do not conform to the prescribed rules.

# Test case action points to check Job Control Procedures

1. A wrong program is invoked and/or the wrong library/files are referenced.
2. Program execution sequence does not follow the JCL condition codes setting.
3. Run time parameters are not validated before use.

# Test case action point to check the program documentation

Supportive documentation (Inline Help, Manual etc.) is not consistent with the program behavior.The information inside the operation manual is not clear and concise with the application system.The operational manual does not cover all the operation procedures of the system.

# Test case action point to check program structure (through program walkthrough)

Coding structure does not follow coding standards.

# Test case action point to check the performance of the AUT

The program runs longer than the specified response time.

Sample Test Cases

1. Screen label checks.
2. Screen video checks with test data set.
3. Creation of record with valid data set.
4. Rejection of record with invalid data set.
5. Error handling upon empty file.
6. Batch program run with test data set.

Integration Test Case Preparation Guidelines

The following are the suggested action points based on which the test case can be derived and executed for integration testing.

# Test case action point to check global data (e.g. Linkage Section)

Global variables have different definition and/or attributes in the programs that referenced them.

# Test case action point to check program interfaces

1. The called programs are not invoked while they are supposed to be.
2. Any two interfaced programs have different number of parameters, and/or the attributes of these parameters are defined differently in the two programs.
3. Passing parameters are modified by the called program while they are not supposed to be.
4. Called programs behave differently when the calling program calls twice with the same set of input data.
5. File pointers held in the calling program are destroyed after another program is called.

#Test case action point to check consistency among programs

The same error is treated differently (e.g. with different messages, with different termination status etc.) in different programs.

Sample Test Cases

1. Interface test between programs xyz, abc & jkl.
2. Global (memory) data file 1 test with data set 1.

You can read the following document by “Cem Kaner “ – What is a good test case?
http://www.kaner.com/pdfs/GoodTest.pdf

0 comments