タグ

testとmockに関するuokadaのブックマーク (2)

  • Python – Getting Started with Python Mock

    The following examples all use the Python Mock library. This post is intended as a quick “Getting Started” for someone who is new to using Python Mock. For more advanced usages you can refer to the Python Mock Documentation. You can download the code from GitHub here. (Follow the instructions in the Readme) Setup You will need to install the mock library: Here is the code we will use as our “code

    Python – Getting Started with Python Mock
  • [lib] モックとスタブの違い

    TEST http://d.hatena.ne.jp/devbankh/201001 モックやスタブを使った効率的なユニットテスト http://d.hatena.ne.jp/devbankh/201002 モックとスタブの違い コミュニケーション http://d.hatena.ne.jp/devbankh/20051124 簡単かつ効果的に話すために "モックオブジェクト"という言葉は、テストのために物のオブジェクトをまねる特殊なオブジェクトを表す言葉として定着した。しかしモックという言葉は元々スタブをキャッチーにしたものでなく、[スタブを使ったのとは別の] ユニットテスト方法を用いるためのものなのだ。この記事では、モックオブジェクトのファンに好まれる相互作用中心のテストと、よく行わている状態中心のテストスタイルとの違いを説明するために、モックとスタブの違いについて掘り下げる。 目次

    [lib] モックとスタブの違い
  • 1