Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
Debug and Code Coverage in RDi v9.1
Speaker : Alan Boxall – Rational Debug Architect
Technology Overview
2
AIX
(C,C++,
COBOL, PL/I)
zTPF
(C/C++, ASM)
JVM
(Java, JSP)
Java
Debug Model
Debug Tool
(COBOL,C,C++,
PL/I, ASM)
dbx
(C,C++)
Linux x86 Linux PPC
iSeries
(RPG, COBOL,
C/C++, CL)
Debug Client
Compiled Lang.
Debug Model
RDz/RD A&L/RDi/RAD(Eclipse based UI)
Integrated z
Debugger
(COBOL,C,C++,
PL/I)
Probe
Debug engines
Enhancements for RDi 9.1
• Full support for IBM i 7.2 including new features in RPG and CL.
– Includes tokenizer, content assist, program verifier and syntax checker support
– Move to 7.2 levels of Language Reference manuals
• F1 help in ILE RPG editor now finds specific keyword and BIF as well as opcode (RFE with 38 votes)
• Generation of free-form RPG from D-Spec, Procedure and Java Method Call wizards
• Integrated Code Coverage analysis of batch programs (RFE 21404)
• Filterable ILE RPG outline view to quickly find definition of interest (28 + 20 votes)
• Improved handling of EBCDIC hex characters in recent Windows versions (19 votes)
• SEP breakpoints can now be set from within the editor (RFE 25266)
• Ability to suppress “Program Terminated” message at end of debug session (RFE 22166)
• DDS references in Screen and Report Designer are resolved off of the UI thread, improving the responsiveness of the UI especially on slow connections
• Filtering members by member text
• Move to latest version of JTOpen
RDi 9. 1 - Filterable outline view
• The following 2 RFEs were implemented using an optional
filter field at the top of the outline view that subsets the
view as you type, quickly zeroing in on the definition you
had in mind.
• RFE 10188 Search within Outline VIEW - 28 votes
• RFE 24677 Outline View: Filtering - 20 votes
• As you can see in the screen cap below, after type EMP,
only those definitions containing EMP are visible in the
outline view
Extend IBM i member filters to be able to use member text
• CAAC AD0150 – IBM is listening!
• With 10 characters, names are too restrictive for filtering
RDi 9.1 Line level Code Coverage Analysis Capability
• Code coverage can be launched on any program or service program that can be
debugged – independent of language
• You can see exactly which lines were covered and not.
• This can be used to determine the effectiveness of automated or manual tests
• Can help focus additional testing on code paths that have not been executed
• Can aid in detecting duplicate tests
• Can help recognize dead code
Code Coverage Report
• After running code coverage, a report is shown as an editor.
• You can drill down through programs, modules and procedures and see the coverage
statistics for each
Coverage annotated in the editor
• Drilling down from the report, the editor will be opened on the related member with
green and red annotations showing which lines were covered.
HTML Report
• The results can shown via HTML or PDF reports so they are available for those who
are not in the Eclipse client, i.e. quality assurance, management etc.
HTML Report procedure coverage
• You can drill down into the HTML report to see the coverage by procedure
HTML Code Coverage Source View
• Drilling into the procedure will provide a view of the source at the time it was analyzed,
with green and red annotations showing exactly which lines were covered.
Launch Options
Customize how the program is invoked
Customize the Code Coverage Analysis
These results can be accumulated see the
coverage of the total suite of tests as well as
speeding up the analysis of subsequent test runs.
Can track the coverage at the higher level of
procedures or programs
Option to generate HTML and PDF reports from
the initial launch. Can always generate them later.
Example of Code Coverage of Programs
• Here is a program level report for an IBM i program (SRVTESTP2) that invokes
another service program (SRVTESTSV). Both of the targeted programs were covered
in this run.
Code Coverage History view allows operations on reports
HTML and PDF reports need
to be generated before they
can be opened
Coverage History can be
exported and imported into
other workspaces
Compare 2 runs to see improvement in coverage
• Select 2 runs in the history view and compare – 4% improvement for chk_subres()
The End