Slides - TAIC PART 2010

TeCReVis: A Tool for Test Coverage and
Test Redundancy Visualization
Negar Koochakzadeh
Vahid Garousi
Software Quality Engineering
Research Group
University of Calgary, Canada
Acknowledging funding and support from:
Vahid Garousi, 2006-2012
1
Talk Outline
ƒ Existing Code Coverage Tools
ƒ The need for Test Visualization
ƒ 1st Feature of TeCReVis: Code Coverage Visualization
ƒ TeCReVis - Graphical User Interface
ƒ 2nd Feature of TeCReVis: Test Redundancy
Management
ƒ TeCReVis - Implementation Details
ƒ Usage Scenarios of the Tool
ƒ Availability and Demo Videos
ƒ Q/A
Vahid Garousi, 2006-2012
2
Existing Code Coverage Tools
ƒ To support automated code coverage measurement and
analysis…
ƒ test coverage values are conventionally shown in percentages
and are visualized by progress-bar-like green/red boxes in the
existing coverage tools
ƒ e.g., the CodeCover plug-in for the Eclipse IDE
Vahid Garousi, 2006-2012
3
However… (The need for Test Visualization)
ƒ However with increasing size and complexity of code
bases of both systems under test and also their
automated test suites (e.g., based on JUnit)
ƒ there is a need for visualization techniques to enable
testers to analyze code coverage in “higher” levels of
abstraction and in holistic manners
ƒ e.g., which packages of the SUT are covered by a
specific set of test cases? Two domains…
Test Suite
Vahid Garousi, 2006-2012
SUT
4
Talk Outline
ƒ Existing Code Coverage Tools
ƒ The need for Test Visualization
ƒ 1st Feature of TeCReVis: Code Coverage Visualization
ƒ TeCReVis - Graphical User Interface
ƒ 2nd Feature of TeCReVis: Test Redundancy
Management
ƒ TeCReVis - Implementation Details
ƒ Usage Scenarios of the Tool
ƒ Availability and Demo Videos
ƒ Q/A
Vahid Garousi, 2006-2012
5
The Visualization Idea
1st Feature: Test Coverage Graph (TCG)
Test Artifact
Test Package
Test Class
covers
Test Method (case)
SUT Artifact
Package
Statement
Vahid Garousi, 2006-2012
Class
Branch
Method
Coverable Item
Condition
Loop
6
TeCReVis - Graphical User Interface
ƒ Various granularities can be selected for both groups
of items (e.g., method, class or package).
Vahid Garousi, 2006-2012
7
Talk Outline
ƒ Existing Code Coverage Tools
ƒ The need for Test Visualization
ƒ 1st Feature of TeCReVis: Code Coverage Visualization
ƒ TeCReVis - Graphical User Interface
ƒ 2nd Feature of TeCReVis: Test Redundancy
Management
ƒ TeCReVis - Implementation Details
ƒ Usage Scenarios of the Tool
ƒ Availability and Demo Videos
ƒ Q/A
Vahid Garousi, 2006-2012
8
2nd Feature of TeCReVis
ƒ
TeCReVis: A Tool for Test Coverage and Test Redundancy Visualization
ƒ
Test Redundancy Graph (TRG)
ƒ
The test redundancy metrics are defined in an earlier paper*
N. Koochakzadeh, V. Garousi, and F. Maurer, "Test Redundancy Measurement Based on Coverage Information: Evaluation and Lessons
Learned," in Proc. of Int. Conf. on Soft. Testing, Verification, and Validation (ICST), 2009.
Vahid Garousi, 2006-2012
9
Test Redundancy Management using TeCReVis
For details see…N. Koochakzadeh and V. Garousi “A Tester-Assisted Methodology
for Test Redundancy Detection”, Journal on Advances in Software Engineering,
Special Issue on Software Test Automation, 2010: pp. 1-13.
Vahid Garousi, 2006-2012
10
Talk Outline
ƒ Existing Code Coverage Tools
ƒ The need for Test Visualization
ƒ 1st Feature of TeCReVis: Code Coverage Visualization
ƒ TeCReVis - Graphical User Interface
ƒ 2nd Feature of TeCReVis: Test Redundancy
Management
ƒ TeCReVis - Implementation Details
ƒ Usage Scenarios of the Tool
ƒ Availability and Demo Videos
ƒ Q/A
Vahid Garousi, 2006-2012
11
TeCReVis - Implementation Details
ƒ Simplified package diagram of CodeCover and the modified parts in
TeCReVis
model
instrumentation
…
eclipse
metrics
…
report
…
…
Modified
packages
in TeReVis
…
Vahid Garousi, 2006-2012
Visualization
library
Used in TeReVis
12
TeCReVis - Implementation Details
ƒ Class Diagram of package org.codecover.eclipse.views
Vahid Garousi, 2006-2012
13
TeCReVis - Implementation Details
Sample Code
Vahid Garousi, 2006-2012
14
Talk Outline
ƒ Existing Code Coverage Tools
ƒ The need for Test Visualization
ƒ 1st Feature of TeCReVis: Code Coverage Visualization
ƒ TeCReVis - Graphical User Interface
ƒ 2nd Feature of TeCReVis: Test Redundancy
Management
ƒ TeCReVis - Implementation Details
ƒ Usage Scenarios of the Tool
ƒ Availability and Demo Videos
ƒ Q/A
Vahid Garousi, 2006-2012
15
Usage Scenarios of the Tool
ƒ Coverage (test adequacy) improvement
ƒ Test suite maintenance as the SUT evolves
z
An empirical study is reported in a TAIC PART 2010 fast abstract
ƒ Fault localization
z
An empirical study is reported in a TAIC PART 2010 fast abstract
ƒ Test redundancy detection
z
For details see…N. Koochakzadeh and V. Garousi “A Tester-Assisted
Methodology for Test Redundancy Detection”, Journal on Advances in
Software Engineering, Special Issue on Software Test Automation,
2010: pp. 1-13.
z
and N. Koochakzadeh, V. Garousi, and F. Maurer, "Test Redundancy
Measurement Based on Coverage Information: Evaluation and Lessons
Learned," in Proc. of Int. Conf. on Soft. Testing, Verification, and
Validation (ICST), 2009.
Vahid Garousi, 2006-2012
16
Tool availability and Demo Videos…
ƒ www.softqual.ucalgary.ca/sw_tools.html
Vahid Garousi, 2006-2012
17
Talk Outline
ƒ Existing Code Coverage Tools
ƒ The need for Test Visualization
ƒ 1st Feature of TeCReVis: Code Coverage Visualization
ƒ TeCReVis - Graphical User Interface
ƒ 2nd Feature of TeCReVis: Test Redundancy
Management
ƒ TeCReVis - Implementation Details
ƒ Usage Scenarios of the Tool
ƒ Availability and Demo Videos
ƒ Q/A
Vahid Garousi, 2006-2012
18