190 likes | 413 Vues
Testing and Debugging. Programmers responsibility that program works correctly! Can write program incrementally You must test anything that the user may enter on every screen High–Low ranges of data entered Invalid entries – when feasible. Types of Testing. Unit Test
E N D
Testing and Debugging • Programmers responsibility that program works correctly! • Can write program incrementally • You must test anything that the user may enter on every screen • High–Low ranges of data entered • Invalid entries – when feasible CICS-Dbg
Types of Testing • Unit Test • Tested by itself to verify performance • Correct screens displayed • Field edits working correctly • Files updated correctly • Usually done by programmer CICS-Dbg
Types of Testing • Concurrency Test • Run concurrently on several terminals • Verify multiple executions - no interference • Usually need help for this testing • Verify record ‘locks’ (if used) • Verify ‘busy’ message (if used) CICS-Dbg
Types of Testing • Integration Test • Run with other programs • Verify the program works as part of system • Can also find problems with app design • Screen Formats • PF key uses and layouts • Color coding used, etc. CICS-Dbg
Types of Testing • Regression Test • Verify functions not changed still work • Very time consuming • Entire original test usually repeated • 70+ Percent is maintenance (not NEW!) • Often done hurriedly with poor results CICS-Dbg
Test Environment • Usually separate CICS region • Relaxed Security • Create own table entries • Create test Data Sets • Access to CICS debug aids • CEMT, CECI, CEDF, CEDC • Change management software CICS-Dbg
The Test Plan • Try and test everything! • Maximum and Minimum Values • Required Fields • Missing Fields • Default Values • Data Set Access and Updates • ‘Clean Up’ when Finished! CICS-Dbg
Test Steps • Test the MAPSETS • CECI transaction – SEND MAP • Verify items on checklist Page 201 • Program, MOVE ALL ‘X’ to fields, SEND MAP • Test Program with VALID data • Test ‘normal’ functions and defaults • Test Program with INVALID data • Most time consuming making up data • Test all edit rules and defaults CICS-Dbg
CEDA (For Table Updates) • CEDADI G(group) [Display Group] • (where nn is last two digits of your ID • Find similar entries and type following: • COPY AS(VIS0nn) - MapSet • COPY AS(VIP0nn) - Program • COPY AS(V0nn) - Transaction ID • Alter – Change to new program name! • COPY AS(NAMADDnn) – VSAM File • Alter – Change DSN and verify Settings • CEDA I G(group) [Install Group] CICS-Dbg
CICS Transactions for Testing • CEMT – Master Terminal Transaction • NEWCOPY Program / Map • Must do after each COMPILE! • CEMT I PROG(V*QQ) • OPEN/CLOSE a Data Set • Needed for rebuilding a Data Set • CEMT I FI(V*QQ) • DELETE / DEFINE of VSAM Data Set CICS-Dbg
CEMT (Handy Transactions) • Used for NEWCOPY after Compile(s) • CEMT I PROG(VIP*QQ) • Lists COBOL Programs • CEMT I PROG(VIS*QQ) • Lists Assembler (MAP) Programs • CEMT I FI(*QQ) [For initializing files] • Lists All Your CICS VSAM Files CICS-Dbg
CICS Transactions for Testing • CECI – Command-level Interpreter • Allows execution of Most CICS commands • Can test MAP display • Can store data in VARIABLES • ALL CECI Variables start with ‘&’ • Can modify (corrupted) Data Sets • READ UPDATE into &rec, then REWRITE! CICS-Dbg
CECI (For MAP Testing) CECI SEND MAP(‘VIDS0M1’) MAPSET(‘VIS0QQ’) [ERASE] MAPONLY • Shows command before and after • Can run most CICS Commands • Can use variables! (Pages 211 - 215) CICS-Dbg
Debugging a CICS Abend • ABEND = ABnormal END of Program • Program encounters error • CICS presents Abend Code to Program • Program can handle with message • Program can ignore – (CICS Abend) • Over 300 Abend codes • Only a few are usually handled CICS-Dbg
Abend Code Types • Exceptional Conditions (AEI and AEY) • File Not Open, Record Not Found, Etc. • Program Checks (ASRA) • S0C7, other program errors. • Other (Misc) Abend Codes • Cursor off screen, no map found, etc. CICS-Dbg
Execution Diagnostics Facility • Same Terminal Checkout Mode • ‘CEDF’ entered from clear screen • Terminal Responds: EDF MODE ON • Enter TRAN-ID of Program to debug • Each CICS COMMAND is shown • Before execution and after execution • Status shown, NORMAL is Good! • You can add ‘Extra’ CICS Commands CICS-Dbg
(Re)Build VSAM Data Files • In CICS, Close Files - CEMT I FI(V*QQ) • In TSO, RUN: VCUSTDS and VTAPEALL • In CICS, Open Files – CEMT I FI(V*QQ) • In CICS, Enter Customer(s), Tape(s) • In CICS, Close Files (one more time) • In TSO, RUN: VTAPEBX (Builds Index) • In CICS, Open Files (For last time?) CICS-Dbg