devlove tdd : for whom the tests run

78
誰が為のテスト - 千里の道も一歩から - 和田 卓人 (a.k.a id:t-wada) Jun, 22 2009 @ DevLOVE

Upload: guest2724dc

Post on 24-May-2015

894 views

Category:

Technology


0 download

DESCRIPTION

DevLOVE TDD : For Whom the Tests RunJun, 22 2009 @ DevLOVE

TRANSCRIPT

Page 1: DevLOVE TDD : For Whom the Tests Run

誰が為のテスト- 千里の道も一歩から -

和田 卓人 (a.k.a id:t-wada)

Jun, 22 2009 @ DevLOVE

Page 2: DevLOVE TDD : For Whom the Tests Run

自己紹介

Page 3: DevLOVE TDD : For Whom the Tests Run

自己紹介名前: 和田 卓人 (わだ たくと)

ブログ: http://d.hatena.ne.jp/t-wada

メール: [email protected]

Twitter: http://twitter.com/t_wada

タワーズ・クエスト株式会社 取締役社長

Page 4: DevLOVE TDD : For Whom the Tests Run

これまで書いたものWEB + DB PRESSvol.35 「実演! テスト駆動開発」vol.37 「実演! リファクタリング」vol.42 「REST特集」vol.49 「DRY特集」LifeHacks PRESSオープンソースマガジン(リレーコラム)他いろいろ

Page 5: DevLOVE TDD : For Whom the Tests Run

gihyo.jpの連載『[動画で解説]和田卓人の“テスト駆動開発”講座』http://gihyo.jp/dev/serial/01/tdd/全20回すべて動画付き解説ニコニコ動画でも見れます

WEB+DB過去記事の特設サイトと動画も

Page 6: DevLOVE TDD : For Whom the Tests Run

デベロッパーテスティング・ライブ - 自信を持ってコードを書くための心・技・体 -

【徹底討論】テストなんていらない?! -テストを、どこまでやるべきか?

パネルディスカッション:テストを行うこと、テストを続けること

デブサミ

Page 7: DevLOVE TDD : For Whom the Tests Run

よろしくおねがいします

Page 8: DevLOVE TDD : For Whom the Tests Run

大事なことから

Page 9: DevLOVE TDD : For Whom the Tests Run

感謝

Page 10: DevLOVE TDD : For Whom the Tests Run

私をここに立たせてくれた全てのひとに

Page 11: DevLOVE TDD : For Whom the Tests Run

30分でこころを持ち帰ってもらいたい

Page 12: DevLOVE TDD : For Whom the Tests Run

2009年5月30日

Page 13: DevLOVE TDD : For Whom the Tests Run

papandaさん達と打ち合わせ

Page 14: DevLOVE TDD : For Whom the Tests Run

受け取った思い

Page 15: DevLOVE TDD : For Whom the Tests Run

伝えたいこと

Page 16: DevLOVE TDD : For Whom the Tests Run

まず己から変わる自分と向き合う鍛錬する背中を見せる

Page 17: DevLOVE TDD : For Whom the Tests Run

2000年

Page 18: DevLOVE TDD : For Whom the Tests Run

生意気な大学生

Page 19: DevLOVE TDD : For Whom the Tests Run

アナパタ勉強会@OGIS

Page 20: DevLOVE TDD : For Whom the Tests Run

2001年

Page 21: DevLOVE TDD : For Whom the Tests Run

完璧な設計を求めて

Page 22: DevLOVE TDD : For Whom the Tests Run

敗北

Page 23: DevLOVE TDD : For Whom the Tests Run

2002年2003年

Page 24: DevLOVE TDD : For Whom the Tests Run

大規模プロジェクト

Page 25: DevLOVE TDD : For Whom the Tests Run

ひたすら読書

Page 26: DevLOVE TDD : For Whom the Tests Run
Page 27: DevLOVE TDD : For Whom the Tests Run

Fowlerの思い 

UMLのエッセンスRefactoringXPシリーズ

Page 28: DevLOVE TDD : For Whom the Tests Run

深夜の写経

Page 29: DevLOVE TDD : For Whom the Tests Run

masarlさん

Page 30: DevLOVE TDD : For Whom the Tests Run

KentB生原稿

Page 31: DevLOVE TDD : For Whom the Tests Run

TDD の会得へ

Page 32: DevLOVE TDD : For Whom the Tests Run

2004年7月1日

Page 33: DevLOVE TDD : For Whom the Tests Run

チームかくたに

Page 34: DevLOVE TDD : For Whom the Tests Run

全てをぶつける

Page 35: DevLOVE TDD : For Whom the Tests Run

2004年以前の私へ

Page 36: DevLOVE TDD : For Whom the Tests Run
Page 37: DevLOVE TDD : For Whom the Tests Run

私たちの手を止めるものは

何か

Page 38: DevLOVE TDD : For Whom the Tests Run

不安

Page 39: DevLOVE TDD : For Whom the Tests Run

開発方法論は不安克服の

歴史

Page 40: DevLOVE TDD : For Whom the Tests Run

TDDもまた不安克服の手法です

Page 41: DevLOVE TDD : For Whom the Tests Run

TDDとは

1. テストを書き2. そのテストを実行して失敗させ(Red)3. 目的のコードを書き4. 1で書いたテストを成功させ(Green)5. テストが通るままでリファクタリングを行う(Refactor)

6. 1~5を繰り返す

Page 42: DevLOVE TDD : For Whom the Tests Run

テストの分類

DeveloperTesting

開発者

開発促進

CustomerTesting

顧客(のロール)

進捗管理

QATesting

品質保証担当者

(のロール)

品質保証

「テスト」

Page 43: DevLOVE TDD : For Whom the Tests Run

Developer Testingとは

•プログラマの•プログラマによる•プログラマのための•プログラムとしてのテストを書きながら•開発を行っていく手法

Page 44: DevLOVE TDD : For Whom the Tests Run

フィードバック

Page 45: DevLOVE TDD : For Whom the Tests Run

自分のバカさと向き合う

Page 46: DevLOVE TDD : For Whom the Tests Run

•即座にフィードバックを得るため•書いたコードに自信を持つため•これから書くコードに自信を持つため

Developer Testing にソフトウェア工学的なメリットはいろいろあるけれど、最大の理由は工学的なものではない。最大の理由は心理的なもの

Page 47: DevLOVE TDD : For Whom the Tests Run

TDDのこころ

Page 48: DevLOVE TDD : For Whom the Tests Run

動作する、きれいなコードへ

きれい

汚い

(すぐには)動かない 動作する

二つの道がある

Page 49: DevLOVE TDD : For Whom the Tests Run

一つずつ少しずつ

Page 50: DevLOVE TDD : For Whom the Tests Run

ひとりずつ対処する。

複数を相手にしない。

Page 51: DevLOVE TDD : For Whom the Tests Run

すばやくまわす

Page 52: DevLOVE TDD : For Whom the Tests Run

不安をテストに

Page 53: DevLOVE TDD : For Whom the Tests Run

きれい

汚い

(すぐには)動かない 動作する

Red

Green

Refactoring

TDDと黄金の回転

Page 54: DevLOVE TDD : For Whom the Tests Run

なぜリファクタリングするのか?

Page 55: DevLOVE TDD : For Whom the Tests Run

TDDの真の目的

Page 56: DevLOVE TDD : For Whom the Tests Run

私たちが気付くのはいつ?

Page 57: DevLOVE TDD : For Whom the Tests Run

フィードバック学びを

否定しない

Page 58: DevLOVE TDD : For Whom the Tests Run

計画する設計する

Page 59: DevLOVE TDD : For Whom the Tests Run

計画し続ける設計し続ける

Page 60: DevLOVE TDD : For Whom the Tests Run
Page 61: DevLOVE TDD : For Whom the Tests Run

テストは目的ではなく手段

Page 62: DevLOVE TDD : For Whom the Tests Run

TDDは品質を保証しない

TDDは品質を向上させる

Page 63: DevLOVE TDD : For Whom the Tests Run

TDDはテスト技法では

ない

Page 64: DevLOVE TDD : For Whom the Tests Run

変化を常態とする

Page 65: DevLOVE TDD : For Whom the Tests Run

TDDの真の目的

Page 66: DevLOVE TDD : For Whom the Tests Run

健康

Page 67: DevLOVE TDD : For Whom the Tests Run

変化に対応するのは健康体のコード

Page 68: DevLOVE TDD : For Whom the Tests Run

変化に対応するのは健康体のチーム

Page 69: DevLOVE TDD : For Whom the Tests Run

不安の克服健康の維持

Page 70: DevLOVE TDD : For Whom the Tests Run

テストのないコードが沢山あるんだけど

Page 71: DevLOVE TDD : For Whom the Tests Run
Page 72: DevLOVE TDD : For Whom the Tests Run

誰が為のテスト?

Page 73: DevLOVE TDD : For Whom the Tests Run

いまの自分未来の自分いまの仲間未来の仲間

Page 74: DevLOVE TDD : For Whom the Tests Run

一人でも始められる

Page 75: DevLOVE TDD : For Whom the Tests Run

テストは人の為ならず

Page 76: DevLOVE TDD : For Whom the Tests Run

おわりに

Page 77: DevLOVE TDD : For Whom the Tests Run

テストはスキルです• テストやTDDはスキルです。つまり…• 才能ではなく、習得可能です• 量は質に転化します• 写経!!

Page 78: DevLOVE TDD : For Whom the Tests Run

ご清聴ありがとうございました