icst 2015 まるわかりday 論文紹介:perspectives on white box testing

20
Perspectives on White-Box Testing: Coverage,Concurrency, and Concolic Execution 著著 Azadeh Farzan, Andreas Holzer, Helmut Veith 著著著 著著著著著著著 ICST 2015 著著著著著 Day 著著著著

Upload: keiji-uetsuki

Post on 13-Aug-2015

312 views

Category:

Engineering


1 download

TRANSCRIPT

Page 1: ICST 2015 まるわかりDay 論文紹介:Perspectives on white box testing

Perspectives on White-Box Testing: Coverage,Concurrency, and Concolic Execution

著者 Azadeh Farzan, Andreas Holzer, Helmut Veith

紹介者: うえつきけいじICST 2015 まるわかり Day 論文紹介

Page 2: ICST 2015 まるわかりDay 論文紹介:Perspectives on white box testing

背景近年 Concolic Testing 技術によるホワイトボックステストが盛り上がっている

ツールもいっぱいある– http://mit.bme.hu/~

micskeiz/pages/code_based_test_generation.html

2

Page 3: ICST 2015 まるわかりDay 論文紹介:Perspectives on white box testing

Concolic Testing の活用A. バグ検出B. 全数探索C. 部分探索

B ができるのが理想であるが、ソフトウェア規模が大きくなると非現実的よって A の活用がすすんでいるC には課題あり

3

Page 4: ICST 2015 まるわかりDay 論文紹介:Perspectives on white box testing

部分探索の課題• 探索の網羅性と実行リソース・時間のト

レードオフを制御する手段が必要

• 探索アルゴリズムは網羅結果を報告し、ユーザが探索戦略を調整できること

4

Page 5: ICST 2015 まるわかりDay 論文紹介:Perspectives on white box testing

2つの取組みテスト仕様(=探索したい対象)を厳密に記述できるクエリ言語を開発し、探索する空間を制御できる仕組みを構築

並行(マルチスレッド)プログラムにたいする Concolic Testing の拡張技術を開発。探索戦略の柔軟な調整が可能

5

Page 6: ICST 2015 まるわかりDay 論文紹介:Perspectives on white box testing

クエリによるテストケースの選択

http://forsyte.at/download/ase-slides.pdf より抜粋

データベースから SQL によってデータを取り出すように、

ソースコードからクエリ(※)によってテストケースを取り出す

※ FQL: FShell Query Language

6

Page 7: ICST 2015 まるわかりDay 論文紹介:Perspectives on white box testing

テスト仕様としてのクエリテストしたい関心ごとを記載する

すべてのブランチを実行する

関数 foo のすべてのステートメントを実行する

10 行目を実行した後 j > 0 を満足するすべてのステートメントを実行する

抽象的

具体的

7

Page 8: ICST 2015 まるわかりDay 論文紹介:Perspectives on white box testing

FQL の文法単純な文法、正規表現による拡張性

cover @CONDITIONEDGE

cover @BASICBLOCKENTRY & @FUNC(foo)

cover @BASICBLOCKENTRY passing ˆ(@LINE(10).{j>0}+NOT(@LINE(10))) $∗

すべてのブランチを実行する

関数 foo のすべてのステートメントを実行する

10 行目を実行した後 j > 0 を満足するすべてのステートメントを実行する

8

Page 9: ICST 2015 まるわかりDay 論文紹介:Perspectives on white box testing

FQA 実行のしくみ2つの実行環境を開発した

FShell

CPA/Tiger

9

Page 10: ICST 2015 まるわかりDay 論文紹介:Perspectives on white box testing

CPA/Tiger述語抽象化法( Predicate Abstraction )を利用したモデル検査にもとづくアーキテクチャ

FShell有界モデル検査( Bounded Model Checking)にもとづくアーキテクチャ

10

Page 11: ICST 2015 まるわかりDay 論文紹介:Perspectives on white box testing

(Con)2 Colic Testing造語です。

Symbolic + Concrete Testing → Concolic Testing

Concolic + Concurrent Testing → (Con)2 colic Testing

11

Page 12: ICST 2015 まるわかりDay 論文紹介:Perspectives on white box testing

(Con)2 Colic Testing並列実行プログラムにたいするConcolic Testing の拡張

http://forsyte.at/wp-content/uploads/fse13-presentation.pdf より抜粋 12

Page 13: ICST 2015 まるわかりDay 論文紹介:Perspectives on white box testing

実行の流れ

1.スレッド個別に Concolic Testing を実行2.スレッド間の干渉を発見したら、探索パス空間に組み込み

1,2を繰り返すことで段階的に探索パス空間を拡張する

http://forsyte.at/wp-content/uploads/fse13-presentation.pdf より抜粋 13

Page 14: ICST 2015 まるわかりDay 論文紹介:Perspectives on white box testing

3スレッドプログラムの例グローバル変数: x,yローカル変数: z

http://forsyte.at/wp-content/uploads/fse13-presentation.pdf より抜粋 14

Page 15: ICST 2015 まるわかりDay 論文紹介:Perspectives on white box testing

各スレッドへの Concolic Testing 実行

グローバル変数: x,yローカル変数: z

未達パス未達パスhttp://forsyte.at/wp-content/uploads/fse13-presentation.pdf より抜粋

15

Page 16: ICST 2015 まるわかりDay 論文紹介:Perspectives on white box testing

干渉の検出グローバル変数: x,yローカル変数: z

干渉を発見!

http://forsyte.at/wp-content/uploads/fse13-presentation.pdf より抜粋

16

Page 17: ICST 2015 まるわかりDay 論文紹介:Perspectives on white box testing

探索パスへの組み込み

http://forsyte.at/wp-content/uploads/fse13-presentation.pdf より抜粋

17

Page 18: ICST 2015 まるわかりDay 論文紹介:Perspectives on white box testing

再び Concolic Testing 実行

http://forsyte.at/wp-content/uploads/fse13-presentation.pdf より抜粋

さっき未達だったところが通った!そしてスレッ

ド A との干渉を検出した!

18

Page 19: ICST 2015 まるわかりDay 論文紹介:Perspectives on white box testing

2回の干渉を組み込んだ結果

http://forsyte.at/wp-content/uploads/fse13-presentation.pdf より抜粋

19

Page 20: ICST 2015 まるわかりDay 論文紹介:Perspectives on white box testing

ツール• FShell– http://forsyte.at/software/fshell/

• CPA/Tiger– http://forsyte.at/software/cpatiger/

• CONCREST– C 言語向け Concolic Testing Tool である CREST を

(Con)2 Colic に拡張– http://forsyte.at/software/concrest/

20