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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
sakakendo0321
March 27, 2019
Technology
1
230
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
30
Introducing static site
sakakendo0321
0
35
open source 2
sakakendo0321
0
53
inner study
sakakendo0321
1
68
meister 2018 final
sakakendo0321
0
38
Other Decks in Technology
See All in Technology
Embedded SREの終わりを設計する 「なんとなく」から計画的な自立支援へ
sansantech
PRO
3
2.4k
こんなところでも(地味に)活躍するImage Modeさんを知ってるかい?- Image Mode for OpenShift -
tsukaman
0
140
AIと新時代を切り拓く。これからのSREとメルカリIBISの挑戦
0gm
0
910
AI駆動開発を事業のコアに置く
tasukuonizawa
1
180
20260204_Midosuji_Tech
takuyay0ne
1
150
Data Hubグループ 紹介資料
sansan33
PRO
0
2.7k
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
10k
茨城の思い出を振り返る ~CDKのセキュリティを添えて~ / 20260201 Mitsutoshi Matsuo
shift_evolve
PRO
1
270
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
3.8k
顧客の言葉を、そのまま信じない勇気
yamatai1212
1
350
CDK対応したAWS DevOps Agentを試そう_20260201
masakiokuda
1
270
MCPでつなぐElasticsearchとLLM - 深夜の障害対応を楽にしたい / Bridging Elasticsearch and LLMs with MCP
sashimimochi
0
170
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1371
200k
The Curious Case for Waylosing
cassininazir
0
240
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
200
The Spectacular Lies of Maps
axbom
PRO
1
520
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
Test your architecture with Archunit
thirion
1
2.2k
BBQ
matthewcrist
89
10k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
640
Information Architects: The Missing Link in Design Systems
soysaucechin
0
770
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.5k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.6k
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 してよりスピーディーに開発をしよう ご利用の際は用法・用量を守って自己責任でご利用ください。 実在の人物や団体、多国籍自動車メーカーなどとは一切関係ありません ご清聴ありがとうございます