0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

スタブ、ドライバ

Posted at

結合テストにおいてのスタブ、ドライバ

モジュール群を順次結合させながら行うため、全体が正しく動作するかどうかを検証するためには、未完成の上位または下位に該当するモジュールが必要となる。
ここでテスト用に作成するダミーの上位モジュールをドライバ
下位モジュールをスタブと呼ぶ。

スタブ

トップダウンテストで必要なテスト用のモジュール

上位にあるテスト対象モジュールからの呼び出しに対して、下位モジュールが返すべき適切な値を返却するなど、未完成の下位モジュールの代わりとして、その機能をシュミレートします。

トップダウンテスト

上位から下位モジュールへ順に結合しながら行う
未完成の下位モジュールがある場合は、その動作をシミュレートするスタブが必要。

ドライバ

ボトムアップテストで必要となるテスト用のモジュール

適切な引数を渡して下位にあるテスト対象モジュールを呼び出す

ボトムアップテスト

ユニットテストが終わった下位モジュールから上位モジュールへ順に結合しながらテストを行う。

気づき

テスト対象モジュールから下か上で呼び出されるか呼び出すかが決まり、テスト用のモジュールの呼び方が変わるのか。
わかりにくいがこれから分かっていこう。

出典

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?