SlideShare a Scribd company logo
1 of 18
プロマネが抑えておくべき
自動化したテスト
テストの自動化 - PM編
よくあるパターン
ドンダケの人月が掛かってしまうの?!
> 技術者:今日(月曜日)は完成します
↓
でも、バグだらけで、結局終電までも終われない... 翌日続き
> リーダー:今週中終る見込み
↓
でも、デグレのせいで、結局週明けになります... しかも土日も休出
従来の単体テスト
(いわゆるPCL)
バグと時間の関係
ちゃんとしたExcel版テスト仕様書が出来た!
1. テストケースに従ってテスターに真面目に見
てくれる(感動T_T) ↓
2. バグ発見 ↓
3. 技術者にお願い ↓
4. 技術者に一生懸命直ってくれる→1へ
以上、繰り返し(何度もの場合も珍しくない)
バグ数
時間
PK
技術者&リーダー
• それでも、本当にバグが直りつつシステ
ムが動いていますね!
• 後もう少しバグを潰せるので、頑張りま
す!
• すいません><遅れているけど、何とか
なりそう(残業時間が延ばしている)
PM
• 真実は予定より遅れているでしょ
• コストが大分掛かってしまったでしょ
• バグ出る恐れはまだあるでしょ
• デグレは大丈夫???
• 結合環境では問題ないの???
さ、現実を見てみましょう!
テストの自動化導入前 >>
単体開発
10~15%
20~25%
40~55%
コストA バグ発生率 VS フェーズ
1~5%
結合環境
受け入れ
統合環境
バグの積み重なり
1.仕様通りにプログラムを組んでいく
⇒バグだらけ
バグバグ
バグ
バ
グ
2.仕様の誤りによりプログラムを修正
⇒既存バグの上に
新たなバグが生じやすい
バグ バグ
3.仕様変更によりプログラムを見直す
⇒もう…どこの問題なのかワケ分からん
テストの自動化導入後
1.仕様通りにプログラムを組んでいく
⇒バグだらけ
バグバグ
バグ
バ
グ
2.仕様の誤りによりプログラムを修正
⇒既存バグの上に
新たなバグが生じやすい
バグ バグ
3.仕様変更によりプログラムを見直す
⇒もう... どこの問題なのかワケ分からん
1.仕様通りにプログラムを組んでいく
⇒バグがその場で殆ど直った!
2.仕様の誤りによりプログラムを修正
⇒そもそも既存バグが少ないため
新たなバグが起きてもほぼ即対応!
3.仕様変更によりプログラムを見直す
⇒テストコードも見直して入替えよう!
単体開発
20~30%
10~20%
1~10%
コストB バグ発生率 VS フェーズ
70~90%
結合環境
受け入れ
統合環境
まさか、180度の逆転ですか!!!
原因を見てみましょう >>
※完全な逆転はあくまでも理想です^^;;
テスト自動化のための単体テストを取り組む
1. 仕様に従って機能を実装
2. テストコードを書いて実行
(1機能ごとに1つではなく、基本は
PCLのようにパターンごとに書く)
3. バグ出たら直して再実行
4. テストが通る前に上記繰返し
単体
テスト
自動化
ロジック書く
テストコード
書いて実行
バグ出ると
即修正
テスト通る
→次へ
(効果的な)例を挙げます!
自動化したテストのメリッドが見える! >>
ある業務の開発なんですが...
製造
設計
要件 業務
機能1
実装A 実装B
機能2
実装C
インターフェース2個
▲
内部メソッド1~3個
PCL相当
単体テストコード(メソッド)
1~5個
インターフェース2個
▲
内部メソッド1~3個
インターフェース2個
▲
内部メソッド1~3個
PCL相当
単体テストコード(メソッド)
1~5個
PCL相当
単体テストコード(メソッド)
1~5個
変化が起こった際の影響範囲推移
インターフェースに変化ある(前と異なる)場合 内部メソッドを見直しながらUTを通していく
インター
フェースZ
内部メソッド
X
単体テスト
コードM
単体テスト
コードN
内部メソッド
Y
単体テスト
コードL
内部メソッド
X
単体テスト
コードM
単体テスト
コードN
内部メソッド
X
単体テスト
コードM
単体テスト
コードN
バ
グ
#@$%
……
---
^_^
修
正
修
正
修
正
仕様
変化
で、どうやって自動化?
前提:PCL単位のテストコードが揃って事前に通した >>
コーヒー一杯を飲んでから…
適切な環境
(IDE&FW)
テストコードを
揃えておいた
実行(ボタン
押下だけで)
結果*が出る
(失敗or成功)
ここから
コーヒー飲もう!
*結果は、沢山(数十件~数百件)
テストケースになった一目で分かる
グラフィック化レポート
テストの自動化
いかがでしょうか
• みんなで自動化を意識しましょう
• 適切なツール(IDE&FW)を活用する
• 実践しながら鍛えていく

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

自動化テスト道への歩み - PM編