debug and code coverage in rdi v9.1 speaker : …2014/09/24  · rdi 9.1 line level code coverage...

18
Debug and Code Coverage in RDi v9.1 Speaker : Alan Boxall Rational Debug Architect

Upload: others

Post on 03-Aug-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Debug and Code Coverage in RDi v9.1 Speaker : …2014/09/24  · RDi 9.1 Line level Code Coverage Analysis Capability • Code coverage can be launched on any program or service program

Debug and Code Coverage in RDi v9.1

Speaker : Alan Boxall – Rational Debug Architect

Page 2: Debug and Code Coverage in RDi v9.1 Speaker : …2014/09/24  · RDi 9.1 Line level Code Coverage Analysis Capability • Code coverage can be launched on any program or service program

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

Page 3: Debug and Code Coverage in RDi v9.1 Speaker : …2014/09/24  · RDi 9.1 Line level Code Coverage Analysis Capability • Code coverage can be launched on any program or service program

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

Page 4: Debug and Code Coverage in RDi v9.1 Speaker : …2014/09/24  · RDi 9.1 Line level Code Coverage Analysis Capability • Code coverage can be launched on any program or service program

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

Page 5: Debug and Code Coverage in RDi v9.1 Speaker : …2014/09/24  · RDi 9.1 Line level Code Coverage Analysis Capability • Code coverage can be launched on any program or service program

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

Page 6: Debug and Code Coverage in RDi v9.1 Speaker : …2014/09/24  · RDi 9.1 Line level Code Coverage Analysis Capability • Code coverage can be launched on any program or service program

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

Page 7: Debug and Code Coverage in RDi v9.1 Speaker : …2014/09/24  · RDi 9.1 Line level Code Coverage Analysis Capability • Code coverage can be launched on any program or service program

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

Page 8: Debug and Code Coverage in RDi v9.1 Speaker : …2014/09/24  · RDi 9.1 Line level Code Coverage Analysis Capability • Code coverage can be launched on any program or service program

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.

Page 9: Debug and Code Coverage in RDi v9.1 Speaker : …2014/09/24  · RDi 9.1 Line level Code Coverage Analysis Capability • Code coverage can be launched on any program or service program

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.

Page 10: Debug and Code Coverage in RDi v9.1 Speaker : …2014/09/24  · RDi 9.1 Line level Code Coverage Analysis Capability • Code coverage can be launched on any program or service program

HTML Report procedure coverage

• You can drill down into the HTML report to see the coverage by procedure

Page 11: Debug and Code Coverage in RDi v9.1 Speaker : …2014/09/24  · RDi 9.1 Line level Code Coverage Analysis Capability • Code coverage can be launched on any program or service program

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.

Page 12: Debug and Code Coverage in RDi v9.1 Speaker : …2014/09/24  · RDi 9.1 Line level Code Coverage Analysis Capability • Code coverage can be launched on any program or service program

Launch Options

Page 13: Debug and Code Coverage in RDi v9.1 Speaker : …2014/09/24  · RDi 9.1 Line level Code Coverage Analysis Capability • Code coverage can be launched on any program or service program

Customize how the program is invoked

Page 14: Debug and Code Coverage in RDi v9.1 Speaker : …2014/09/24  · RDi 9.1 Line level Code Coverage Analysis Capability • Code coverage can be launched on any program or service program

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.

Page 15: Debug and Code Coverage in RDi v9.1 Speaker : …2014/09/24  · RDi 9.1 Line level Code Coverage Analysis Capability • Code coverage can be launched on any program or service program

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.

Page 16: Debug and Code Coverage in RDi v9.1 Speaker : …2014/09/24  · RDi 9.1 Line level Code Coverage Analysis Capability • Code coverage can be launched on any program or service program

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

Page 17: Debug and Code Coverage in RDi v9.1 Speaker : …2014/09/24  · RDi 9.1 Line level Code Coverage Analysis Capability • Code coverage can be launched on any program or service program

Compare 2 runs to see improvement in coverage

• Select 2 runs in the history view and compare – 4% improvement for chk_subres()

Page 18: Debug and Code Coverage in RDi v9.1 Speaker : …2014/09/24  · RDi 9.1 Line level Code Coverage Analysis Capability • Code coverage can be launched on any program or service program

The End