261
158

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 5 years have passed since last update.

[図解]スタブとモックの違い

Posted at

自分用備忘録。

どちらもテスト対象に依存関係が必要な場合のために使うダミーですが、違いをサクッとまとめました。

モック

テスト対象からの出力を受けるダミー。

image1.jpg

スタブ

テスト対象に都合の良いデータを出力してくれるダミー。

image2.jpg

261
158
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
261
158

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?