20101001-introduction-to-developer-testing-with-ruby

27
Rubyにおける テスティング環境の紹介 (導入編) 島田 浩二 [email protected] — Introduction to developer testing with Ruby. 2010年10月1日(金) JaSST’10 Hokkaido 2010101日金曜日

Upload: koji-shimada

Post on 12-Nov-2014

4.082 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: 20101001-Introduction-to-Developer-Testing-With-Ruby

Rubyにおけるテスティング環境の紹介(導入編)

島田 浩二[email protected]

— Introduction to developer testing with Ruby.

2010年10月1日(金) JaSST’10 Hokkaido

2010年10月1日金曜日

Page 2: 20101001-Introduction-to-Developer-Testing-With-Ruby

しまだ こうじ島田 浩二

Photo by tmaeda

2010年10月1日金曜日

Page 3: 20101001-Introduction-to-Developer-Testing-With-Ruby

2010年10月1日金曜日

Page 4: 20101001-Introduction-to-Developer-Testing-With-Ruby

一般社団法人 LOCAL

2010年10月1日金曜日

Page 5: 20101001-Introduction-to-Developer-Testing-With-Ruby

日本Rubyの会2010年10月1日金曜日

Page 6: 20101001-Introduction-to-Developer-Testing-With-Ruby

from Sapporo,with Love for Ruby

Photo by darashi

2010年10月1日金曜日

Page 7: 20101001-Introduction-to-Developer-Testing-With-Ruby

大事なことを最初に

2010年10月1日金曜日

Page 8: 20101001-Introduction-to-Developer-Testing-With-Ruby

http://regional.rubykaigi.org/sapporo03

2010年10月1日金曜日

Page 9: 20101001-Introduction-to-Developer-Testing-With-Ruby

Rubyにおけるテスティング環境の紹介(導入編)

島田 浩二[email protected]

— Introduction to developer testing with Ruby.

2010年10月1日(金) JaSST’10 Hokkaido

2010年10月1日金曜日

Page 10: 20101001-Introduction-to-Developer-Testing-With-Ruby

1.テストについて2. 2つの成果物3.開発者テスト4.Rubyにおけるテスティング環境の紹介

本日のお品書き

2010年10月1日金曜日

Page 11: 20101001-Introduction-to-Developer-Testing-With-Ruby

テスト2010年10月1日金曜日

Page 12: 20101001-Introduction-to-Developer-Testing-With-Ruby

“『ソフトウェア・テストの技法』

テストとは、エラーを見つけるつもりでプログラムを実行する過程である

2010年10月1日金曜日

Page 13: 20101001-Introduction-to-Developer-Testing-With-Ruby

2つの成果物

2010年10月1日金曜日

Page 14: 20101001-Introduction-to-Developer-Testing-With-Ruby

1. パスしたコード2.手に入れた情報

テストの2つの成果物

2010年10月1日金曜日

Page 15: 20101001-Introduction-to-Developer-Testing-With-Ruby

✓ プロダクトコード

テストをパスしたコード

2010年10月1日金曜日

Page 16: 20101001-Introduction-to-Developer-Testing-With-Ruby

テストによって得た情報✓ プロセスについて

- どういうテストをしてどういう効果があったのか/なかったのか

✓ プロダクトについて- どういう傾向のバグがあったのか/なかったのか

2010年10月1日金曜日

Page 17: 20101001-Introduction-to-Developer-Testing-With-Ruby

テストによって得た情報

✓ 次に行うべきことがわかる- 次に行うべきこと=プロセス

2010年10月1日金曜日

Page 18: 20101001-Introduction-to-Developer-Testing-With-Ruby

1. パスしたコード2.手に入れた情報

テストの2つの成果物

2010年10月1日金曜日

Page 19: 20101001-Introduction-to-Developer-Testing-With-Ruby

1. プロダクト2.プロセス

テストの2つの成果物

2010年10月1日金曜日

Page 20: 20101001-Introduction-to-Developer-Testing-With-Ruby

開発者テスト

2010年10月1日金曜日

Page 21: 20101001-Introduction-to-Developer-Testing-With-Ruby

開発者テスト

✓ テストを通じて、プロダクトに対して開発者が安心できる状態を作り上げていく過程

2010年10月1日金曜日

Page 22: 20101001-Introduction-to-Developer-Testing-With-Ruby

Rubyにおけるテストの現在

2010年10月1日金曜日

Page 23: 20101001-Introduction-to-Developer-Testing-With-Ruby

テスティング・フレームワーク✓ユニットテスト➡TestUnit, RSpec

✓統合テスト➡ Steak, Request Spec

(in RSpec2)

✓受け入れテスト➡Cucmber

2010年10月1日金曜日

Page 24: 20101001-Introduction-to-Developer-Testing-With-Ruby

周辺ツール

✓ 自動化、CI➡ Autotest, Watchr,

integrity

✓ カバレッジ➡ RCov✓ Fixture Replacement

➡ factory_girl, Machinist

✓ モック, スタブ➡ Mocha, RR

2010年10月1日金曜日

Page 25: 20101001-Introduction-to-Developer-Testing-With-Ruby

demo2010年10月1日金曜日

Page 26: 20101001-Introduction-to-Developer-Testing-With-Ruby

http://regional.rubykaigi.org/sapporo03

続きは札幌Ruby会議03で

2010年10月1日金曜日

Page 27: 20101001-Introduction-to-Developer-Testing-With-Ruby

Rubyにおけるテスティング環境の紹介(導入編)

島田 浩二[email protected]

— Introduction to developer testing with Ruby.

2010年10月1日(金) JaSST’10 Hokkaido

2010年10月1日金曜日