Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
pass the test
Search
sakakendo0321
March 27, 2019
Technology
1
210
pass the test
「第8回ゆるはち.it: CI/CDについてゆるく話す」
LT: TestをPassしよう!
https://yuruhachi-it.connpass.com/
sakakendo0321
March 27, 2019
Tweet
Share
More Decks by sakakendo0321
See All by sakakendo0321
meister chapter4
sakakendo0321
0
28
Introducing static site
sakakendo0321
0
32
open source 2
sakakendo0321
0
47
inner study
sakakendo0321
1
63
meister 2018 final
sakakendo0321
0
36
Other Decks in Technology
See All in Technology
Glacierだからってコストあきらめてない? / JAWS Meet Glacier Cost
taishin
1
140
Yamla: Rustでつくるリアルタイム性を追求した機械学習基盤 / Yamla: A Rust-Based Machine Learning Platform Pursuing Real-Time Capabilities
lycorptech_jp
PRO
4
220
ビズリーチが挑む メトリクスを活用した技術的負債の解消 / dev-productivity-con2025
visional_engineering_and_design
3
6.2k
生成AIで小説を書くためにプロンプトの制約や原則について学ぶ / prompt-engineering-for-ai-fiction
nwiizo
6
4k
ドメイン特化なCLIPモデルとデータセットの紹介
tattaka
2
570
AWS認定を取る中で感じたこと
siromi
1
160
面倒な作業はAIにおまかせ。Flutter開発をスマートに効率化
ruideengineer
0
140
FOSS4G 2025 KANSAI QGISで点群データをいろいろしてみた
kou_kita
0
380
WordPressから ヘッドレスCMSへ! Storyblokへの移行プロセス
nyata
0
430
Tech-Verse 2025 Global CTO Session
lycorptech_jp
PRO
0
1.6k
生成AI開発案件におけるClineの業務活用事例とTips
shinya337
0
220
品質と速度の両立:生成AI時代の品質保証アプローチ
odasho
1
190
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.5k
The Cult of Friendly URLs
andyhume
79
6.5k
Documentation Writing (for coders)
carmenintech
72
4.9k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
Why Our Code Smells
bkeepers
PRO
337
57k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
35
2.4k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.5k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
52k
Transcript
Test をPass しよう @sakakendo
こんなことありませんか part.1 ひたすらにCI がエラーを吐いて真っ赤に染まってしまう
こんなことありませんか part.2 気持ち良くマージしたいのに、、
こんなときに volkswagen ci server 上で動いていることを検知したら自身がテストをパスしてるよ うに見せる Volkswagen detects when your
tests are being run in a CI server, and makes them pass. “ “
言語ごとの実装 nodejs https://github.com/auchenberg/volkswagen python https://github.com/The-Compiler/pytest-vw awesome https://github.com/WyriHaximus/awesome-volkswagen
使い方 requirements.txt pytest-vw test_main.py def test_environmental_impact_compliance(): """This test will fail,
but nobody cares because it passes on Travis.""" emissions = 12000 legal_limit = 300 assert emissions < legal_limit
実行結果 local
実行結果 ci server
一応原理とか 環境変数を見て自身がCI server 上で実行されていることを検知する。 本来test の結果を返す関数を何もしない関数で上書きしている ->nodejs test が実行されたタイミングをhook してテスト結果を"success"
に書き 換えてる? -> python
まとめ test をpass してよりスピーディーに開発をしよう ご利用の際は用法・用量を守って自己責任でご利用ください。 実在の人物や団体、多国籍自動車メーカーなどとは一切関係ありません ご清聴ありがとうございます