SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Downloaden Sie, um offline zu lesen
さよなら Flaky
不安定なテストの探し方
サイボウズ
三苫 亮
2021/06/26
オープンソースカンファレンス2021 Hokkaido
自己紹介
• 三苫 亮(@mitomasan)
• サイボウズ kintone開発 Yakumo基盤チーム
• kintone.com の基盤を開発・保守しているチーム
私たちのお悩みごと
• サイボウズの kintone.com 基盤チームは
E2Eテストを使って AWS 上に構築した基盤上で
kintone の動作保証をしたかった
• 幸運にも kintone にはすでに多くの
E2E テストがあった
• しかし新しい基盤上では多くのE2Eテストが
不安定になり基盤の不具合なのか
単にテストが不安定なのか区別できずに困っていた
kintone というサービス
• 複数環境で動いている
• それぞれの環境でミドルウェアが違う
国内データセンター
cybozu.com
AWS US Region
kintone.com
※US向けではロゴも違う
kintone の構成
だいたいこんな感じになってるんだけど
APサーバー
全文検索
サービス
非同期処理
サービス
BLOB
サービス
DB
全文検索エンジン
ストレージ
オンプレとAWSでこの辺りが違う
APサーバー
全文検索
サービス
非同期処理
サービス
BLOB
サービス
DB
全文検索エンジン
ストレージ
俺以外
ぜんぶやんけ!
APサーバーもAWSだと
Dockerコンテナとして動いてる
APサーバー
全文検索
サービス
非同期処理
サービス
BLOB
サービス
DB
全文検索エンジン
ストレージ
俺もやんけ!
この二つは本当に同じ動作?
国内データセンター
cybozu.com
どうやって同じ動作であることを
保証したらいいだろう?
AWS US Region
kintone.com
同じE2Eテストで外形的にテストします
国内データセンター
cybozu.com
E2Eテスト
AWS US Region
kintone.com
E2Eテスト
• エンドツーエンド(End to End)テスト
• 実際に動く環境を用意しユースケースの
一連のシナリオを達成できるか検証する
• Webアプリケーションであれば
ブラウザを自動化してテストすることが多い
E2Eテストの良いところ、悪いところ
• 良いところ
• エンドユーザーの利用と同じ方法でテストできる
• 内部のコンポーネントの実装を意識せずに
外部仕様をテストできる
• コンポーネント間の結合をテストできる
E2Eテストの良いところ、悪いところ
• 悪いところ
• セットアップや実行に時間がかかる
• ブラウザなどを利用すると不安定になりがち(Flaky Test)
💀デバッグ体験が最悪👿
テストが不安定だと何がまずいか
• テスト全体の信頼性が失われる
• 成功するまで再実行されたり
• テストの成否そのものが無視されたり
• 修正しても直ったのか偶然成功したのか区別できない
• 潜在的な不具合が見過ごされる
• たまに失敗するテストケースは
コーナーケースを踏んでいるのかもしれない
不安定なテストの探し方
• 一回のテスト結果からは不安定かどうか判断できない
• 複数回の結果を見て不安定かどうかを判断する
• 何回テストが失敗しているか
• 何回テストの成功・失敗が変化したか
v1 v2 V3 v4 v5 失敗 変化
Case1 ○ ○ × × × 3/5 1/4
Case2 × ○ × ○ × 3/5 4/4
テストの実行履歴とか残してます?
• Jenkins や CircleCI の実行履歴だと、
ビルドごとに見ないといけない
• 不安定なテストを探すには
• テストケースごとの成功・失敗の頻度を見る
• その実行履歴ログをみて原因を確認したい
宵越しのテスト結果
は持たない主義でね
ReportPortal
• 自動テストの結果を記録し
ダッシュボードが作れる
ソフトウェア
• テスト実行中や完了後に
テスト結果を送信
• 多数のテストフレームワークに
対応
不安定なテストの分析
テストの実行履歴
私たちのビフォー・アフター
ビフォー🙅
• 経験をもとにテストが不安定かどうか判定して
再実行や修正を行っていた
• 詳細なテスト結果はログから追う必要があるので
必要になるまで確認しない
アフター🙆
• 不安定なテストを実績をもとに判断できるようになった
• 効果の大きいテストから修正していけるようになった
まとめ
• E2Eテストは不安定になりやすく
特定したりデバッグしにくい
• テストの実行履歴で分析すると
不安定なテストを特定しやすい
• ReportPortal 導入すると探しやすいよ
おしまい
kintone.com
やってやれないことはない
鋭
意
開
発
中

Weitere ähnliche Inhalte

Ähnlich wie さよなら Flaky 不安定なテストの探し方

[Japan Selenium User Community in Remote] Test Automation Journey
[Japan Selenium User Community in Remote] Test Automation Journey[Japan Selenium User Community in Remote] Test Automation Journey
[Japan Selenium User Community in Remote] Test Automation Journey
Woohyeok Kim
 
Delphix and DBmaestro
Delphix and DBmaestroDelphix and DBmaestro
Delphix and DBmaestro
Kyle Hailey
 
2011 JavaOne Apache TomEE Java EE 6 Web Profile
2011 JavaOne Apache TomEE Java EE 6 Web Profile2011 JavaOne Apache TomEE Java EE 6 Web Profile
2011 JavaOne Apache TomEE Java EE 6 Web Profile
David Blevins
 

Ähnlich wie さよなら Flaky 不安定なテストの探し方 (20)

[Japan Selenium User Community in Remote] Test Automation Journey
[Japan Selenium User Community in Remote] Test Automation Journey[Japan Selenium User Community in Remote] Test Automation Journey
[Japan Selenium User Community in Remote] Test Automation Journey
 
Is Advanced Verification for FPGA based Logic needed
Is Advanced Verification for FPGA based Logic neededIs Advanced Verification for FPGA based Logic needed
Is Advanced Verification for FPGA based Logic needed
 
Puppet Camp Paris 2014: Achieving Continuous Delivery and DevOps with Puppet
Puppet Camp Paris 2014: Achieving Continuous Delivery and DevOps with Puppet Puppet Camp Paris 2014: Achieving Continuous Delivery and DevOps with Puppet
Puppet Camp Paris 2014: Achieving Continuous Delivery and DevOps with Puppet
 
Achieving Continuous Delivery with Puppet
Achieving Continuous Delivery with PuppetAchieving Continuous Delivery with Puppet
Achieving Continuous Delivery with Puppet
 
Using The Page Object Pattern
Using The Page Object PatternUsing The Page Object Pattern
Using The Page Object Pattern
 
Big Sky Dev Con 2018 - Building a Serverless Backend
Big Sky Dev Con 2018 - Building a Serverless BackendBig Sky Dev Con 2018 - Building a Serverless Backend
Big Sky Dev Con 2018 - Building a Serverless Backend
 
A Day in the Life of a Cross-platform, DevOps-enabled Team
A Day in the Life of a Cross-platform, DevOps-enabled TeamA Day in the Life of a Cross-platform, DevOps-enabled Team
A Day in the Life of a Cross-platform, DevOps-enabled Team
 
A Day in the Life of a Cross-platform, DevOps-enabled Team
A Day in the Life of a Cross-platform, DevOps-enabled TeamA Day in the Life of a Cross-platform, DevOps-enabled Team
A Day in the Life of a Cross-platform, DevOps-enabled Team
 
A Day in the Life of Cross-platform, DevOps-enabled Team
A Day in the Life of Cross-platform, DevOps-enabled Team A Day in the Life of Cross-platform, DevOps-enabled Team
A Day in the Life of Cross-platform, DevOps-enabled Team
 
A Day in the Life of a Cross-platform, DevOps-enabled Team
A Day in the Life of a Cross-platform, DevOps-enabled TeamA Day in the Life of a Cross-platform, DevOps-enabled Team
A Day in the Life of a Cross-platform, DevOps-enabled Team
 
Simplify CI with the Updated Jenkins Plugin for Sauce Labs
Simplify CI with the Updated Jenkins Plugin for Sauce LabsSimplify CI with the Updated Jenkins Plugin for Sauce Labs
Simplify CI with the Updated Jenkins Plugin for Sauce Labs
 
Advanced Testing and Debugging using the Developer Console webinar
Advanced Testing and Debugging using the Developer Console webinarAdvanced Testing and Debugging using the Developer Console webinar
Advanced Testing and Debugging using the Developer Console webinar
 
Delphix and DBmaestro
Delphix and DBmaestroDelphix and DBmaestro
Delphix and DBmaestro
 
Affordable app sec for startups by - Sandeep Singh, Vaibhav Gupta and Vishal ...
Affordable app sec for startups by - Sandeep Singh, Vaibhav Gupta and Vishal ...Affordable app sec for startups by - Sandeep Singh, Vaibhav Gupta and Vishal ...
Affordable app sec for startups by - Sandeep Singh, Vaibhav Gupta and Vishal ...
 
Continuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and JenkinsContinuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and Jenkins
 
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013 .Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
 
Strickland dvclub
Strickland dvclubStrickland dvclub
Strickland dvclub
 
Customer Sharing: iCook - Continuous Deployment with AWS
Customer Sharing: iCook - Continuous Deployment with AWSCustomer Sharing: iCook - Continuous Deployment with AWS
Customer Sharing: iCook - Continuous Deployment with AWS
 
Improving Batch-Process Testing Techniques with a Domain-Specific Language
Improving Batch-Process Testing Techniques with a Domain-Specific LanguageImproving Batch-Process Testing Techniques with a Domain-Specific Language
Improving Batch-Process Testing Techniques with a Domain-Specific Language
 
2011 JavaOne Apache TomEE Java EE 6 Web Profile
2011 JavaOne Apache TomEE Java EE 6 Web Profile2011 JavaOne Apache TomEE Java EE 6 Web Profile
2011 JavaOne Apache TomEE Java EE 6 Web Profile
 

Mehr von Ryo Mitoma

Mehr von Ryo Mitoma (11)

作る人から作りながら運用する人になっていく
作る人から作りながら運用する人になっていく作る人から作りながら運用する人になっていく
作る人から作りながら運用する人になっていく
 
kintone のレコード絞り込み置き換え事例の紹介
kintone のレコード絞り込み置き換え事例の紹介kintone のレコード絞り込み置き換え事例の紹介
kintone のレコード絞り込み置き換え事例の紹介
 
小さなサービスも契約する時代
小さなサービスも契約する時代小さなサービスも契約する時代
小さなサービスも契約する時代
 
京都在住、時々大阪、アメリカ向けの基盤開発
京都在住、時々大阪、アメリカ向けの基盤開発京都在住、時々大阪、アメリカ向けの基盤開発
京都在住、時々大阪、アメリカ向けの基盤開発
 
Salary negotiation battle on Cybozu - employee side
Salary negotiation battle on Cybozu - employee sideSalary negotiation battle on Cybozu - employee side
Salary negotiation battle on Cybozu - employee side
 
転職ドラフトを活用した給与交渉術~サイボウズ編~
転職ドラフトを活用した給与交渉術~サイボウズ編~転職ドラフトを活用した給与交渉術~サイボウズ編~
転職ドラフトを活用した給与交渉術~サイボウズ編~
 
3000社の業務データ絞り込みを支える技術
3000社の業務データ絞り込みを支える技術3000社の業務データ絞り込みを支える技術
3000社の業務データ絞り込みを支える技術
 
kintoneの検索高速化への取り組み
kintoneの検索高速化への取り組みkintoneの検索高速化への取り組み
kintoneの検索高速化への取り組み
 
サイボウズのリモートワーク・リモートチーム
サイボウズのリモートワーク・リモートチームサイボウズのリモートワーク・リモートチーム
サイボウズのリモートワーク・リモートチーム
 
企業向けクラウドサービスの開発・運用 悩みどころのパターンと対策
企業向けクラウドサービスの開発・運用 悩みどころのパターンと対策企業向けクラウドサービスの開発・運用 悩みどころのパターンと対策
企業向けクラウドサービスの開発・運用 悩みどころのパターンと対策
 
kintoneチームのKAIZEN文化
kintoneチームのKAIZEN文化kintoneチームのKAIZEN文化
kintoneチームのKAIZEN文化
 

Kürzlich hochgeladen

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Kürzlich hochgeladen (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

さよなら Flaky 不安定なテストの探し方