Applying Change Impact Analysis Test to Migration Test
Case Extraction based on IDAU and Graph Analysis
Techniques

Tomohiro Takeda
University of Tsukuba, Tokyo, Japan
1Contents
1.

Background2.

Previous Study

3.

Code Based IDAU

4.

Experiment5.

Conclusion

2

1. Background3

Recent Architecture Trend : Microservice

API Gateway

Monolithic
IA Servers

Whatʼs
Impact?

Micro-Service

Migration

How toasuure?

RDB

Non-SQL-DB

Impact Analysis Test
ChangeFunction A

Function B

Function C

Function D

Test Scope
In this narrow range of test scope, there are much possible to lost any bugs.

ChangeFunction A

Function B

Function C
Test Scope

In this widen range of test case, this project test cost is increasing.

Function DWhy is impact analysis difficult?
External System Layer

Dynamic Memory Layer

Function A

Function B

Function C

Function D

Static Source Code Layer

Data Layer

OS Layer

HW Layer

The application usually has several kinds of layer’s dependencies.
This study based on IDAU test method focuses on the above Static Source Code and Data layer.

2. Previous Study
Impact Data All Used(IDAU)
Test Methodology
7

Overview of IDAUInfluenced ↓Select(R)Function B
Modified ↓Function ADB
Select(R)Update(U)External Design
Docs

Decrease the number oftest cases by the condition ofCRUD Matrix.
Detect a a set of useful
test cases.

Create an expand CRUD table
Based on the External design
documents.

Create the comprehensive combination of test case.

8

Restriction of IDAU

IDAU method has the strong restriction to be applied to the actual
application as follows:

1. Each function is isolated to any other functions.
2. Each function only has dependencies via data.
3. Each function is called by external client application.
4. The call from Client application has input and output.

Influenced ↓First Problem of IDAU

Select(R)Function B
Modified ↓Function ADB
Select(R)Update(U)In the previous study, the relationships between Function andData are only described on the external specification
documents as a natural language.

External Design Docs

In the previous study, testers have to manually detect CRUD
Information via the external design documents described as anatural languages. In this case, there are possible to lost any
CRUD information.

Second Problem of IDAU
Influenced ↓Select(R)Function B
Modified ↓DB
Select(R)Update(U)Function A

In the previous study, it is not possible to detect source code level CRUD information.
BBB

BB

A

B

UpdateDBSelectAA

SelectA

Update・In case of source code level CRUD analysis, we are able to detect U→R, U→U crud operations.

Solution & Experiments

1. Lost of test cases by manual detection.

Automatic Test Case Detection Tool

2. Lost of test cases by detection via theexternal design documents.

Code Based IDAU

3. Experiment3.1. Automatic Test Case
Detection Tool by IDAU

13

Automatic Detection

micro_service:taregets:
Ta1:
endpoint: "https://〜/hello/{id}"YAML

External Design Docs

❌

: get

methodTa2:
endpoint: ”https://〜/dev/names"
method: getsources:
Sa1: ”Managing Console"
entities:
Da1:
name: table1
url: "https://hogehoge.aws.com/"crud:target: Ta1
description: ”get name"entity:Da1: R
source: Out

https://github.com/takedatmh/git/blob/master/ImpactAnalysis.ipynb

3. Experiment3.2. Code Based IDAU

15

Process of Code Based IDAU

Source CodeControl Flow Graphmethod(int i){if(i > 0){i = i + 100;} else {i = 0:}}Jimple(Three Address)

Detect CRUD InfoUpdate

IDAU

Test Case

DeleteCreate16

Source CodeID

123456789

Control Flow Graph

Detect CRUD InfoAPI External Specification/list- List the context paths of all currently installed web
applications for this virtual host. Each context will belisted with the following format path:status: sessions.
Where path is the context path. Status is either runningor stopped. Sessions are the number of active Sessions.

IDAU

Test Case

Target Application

CRUDR/deploy?path=/xxx&war={war-url}- Install and start a new web application attached tocontext path /xxx, based on the contents of the web
application archive found at the specified URL.
/reload?path=/xxx- Reload the Java classes and resources for theapplication at the specified path.

C/resources?type=xxxx- Enumerate the available global JNDI resources,
optionally limited to those of the specified type (fullyqualified Java class name), if available.
/server info
- Display system OS and JVM properties.
/sessions- Deprecated. Use expire.
/expire?path=/xxx- List session idle time information about the web
application attached to context path /xxx for this virtualhost.
/start?path=/xxx- Start the web application attached to context
path /xxx for this virtual host.
/stop?path=/xxx- Stop the web application attached to context
path /xxx for this virtual host.

RUCRDUUD

1011
1213/undeploy?path=/xxx- Shutdown and remove the web application attached tocontext path /xxx for this virtual host, and remove theunderlying WAR file or document base directory.
/findLeak/vminfo- Write some VM info.
/thread dump
- Write a JVM thread dump.

RRC

17

Source Code2

Control Flow Graph/deploy?path=/xxx&war={war-url}- Install and start a new web application attached tocontext path /xxx, based on the contents of the web
application archive found at the specified URL.

Detect CRUD Info

IDAU

Test Case

Control Flow Graph

C18

Source CodeControl Flow Graph

Detect CRUD InfoIDAUTest Case

19

Control Flow Graph

Source CodeIDAPI123456789/list/deploy/reload/resources/serverinfo/sessions/expire/start/stop

10/undeploy

111213IDAU
CRUD
RCURCR
DUU
DDetect CRUD Info

CB-IDAU
CRUD
C,R,U
C,R,U,DC, R, UC, R
C, R
C, R, D
C, R, D
C, R, UC, R, UIDAU

Test Case

MethodTest Case
Number

IDAU

65

CB-IDAU

78

C, R, U, D

R/findLeak

C, R
R/vminfo

C, R
C/threaddump

C, R
20

4. Conclusion

21

Result◾Previous IDAU Method.
Select(R)Function B
DB

65 Test CasesSelect(R)Update(U)Function A◾Code Based IDAU Method
B
B
BBBABSelectAA

SelectA

UpdateUpdateDB78 Test Cases

5. Future Work
Graph Mining

23

Step Base CRUD count by Code Based IDAU

IDMethod1

CB-IDAU
Step Base

Test Case
Number5755

24Bonachich Power Centrality Analysis

Node 8Null-Check varidation step

Node 101
Servlet method execution step25

Link-Community Analysis

26

Node 93, 123, 124, 125

Result of Link-Community Analysis

File I/O steps

27
25

Thanks

Name: Tomohiro Takeda
Position: Student of Tsukuba University
Email: s1740116@s.tsukubai.ac.jp, takedatmh@gmail.com

28