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
180
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
22
Introducing static site
sakakendo0321
0
26
open source 2
sakakendo0321
0
41
inner study
sakakendo0321
1
48
meister 2018 final
sakakendo0321
0
28
Other Decks in Technology
See All in Technology
ワールドカフェI /チューターを改良する / World Café I and Improving the Tutors
ks91
PRO
0
120
Google Cloud Next '24でブログを10本書いた方法と勉強会を沸かせた方法
yasumuusan
0
300
本当のAWS基礎
toru_kubota
0
520
推しは推せるときに推せ! プロダクトにフィードバックしていこう
nakasho
0
320
20240418_Google ColabにLLMが搭載されたようなのでPython x データ分析の勉強方法を考えてみる
doradora09
0
140
アクセス制御にまつわる改善 / Improving access control
itkq
0
540
ServiceNow Knowledge Learning Rise up
manarobot
0
210
LangSmith入門―トレース/評価/プロンプト管理などを担うLLMアプリ開発プラットフォーム
os1ma
3
180
Postman v10リリース後を振り返る / Looking back at Postman v10 after release
yokawasa
1
160
チームでロジカルシンキングに改めて向き合っている話 〜学習環境と実践⽅法〜
sansantech
PRO
3
2.5k
Gitlab本から学んだこと - そーだいなるプレイバック / gitlab-book
soudai
4
430
Delivering Millions of Messages within seconds @ Duolingo
pelelgrino
0
350
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
227
16k
Scaling GitHub
holman
457
140k
Building a Scalable Design System with Sketch
lauravandoore
456
32k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
155
14k
No one is an island. Learnings from fostering a developers community.
thoeni
16
2.1k
The Power of CSS Pseudo Elements
geoffreycrofte
60
5k
Ruby is Unlike a Banana
tanoku
96
10k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
241
1.2M
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Six Lessons from altMBA
skipperchong
21
3k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
125
32k
Fireside Chat
paigeccino
21
2.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 してよりスピーディーに開発をしよう ご利用の際は用法・用量を守って自己責任でご利用ください。 実在の人物や団体、多国籍自動車メーカーなどとは一切関係ありません ご清聴ありがとうございます