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
毎晩の 負荷試験自動実行による効果
recruitengineers
PRO
5
180
[SRE NEXT] ARR150億円_エンジニア140名_27チーム_17プロダクトから始めるSLO.pdf
satos
5
3k
無理しない AI 活用サービス / #jazug
koudaiii
0
100
microCMSではじめるAIライティング
himaratsu
0
150
ClaudeCodeにキレない技術
gtnao
1
860
振り返りTransit Gateway ~VPCをいい感じでつなげるために~
masakiokuda
3
210
対話型音声AIアプリケーションの信頼性向上の取り組み
ivry_presentationmaterials
3
1k
セキュアな社内Dify運用と外部連携の両立 ~AIによるAPIリスク評価~
zozotech
PRO
0
120
ソフトウェアQAがハードウェアの人になったの
mineo_matsuya
3
200
Talk to Someone At Delta Airlines™️ USA Contact Numbers
travelcarecenter
0
160
ポストコロナ時代の SaaS におけるコスト削減の意義
izzii
1
470
Amazon SNSサブスクリプションの誤解除を防ぐ
y_sakata
3
190
Featured
See All Featured
Embracing the Ebb and Flow
colly
86
4.8k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
Unsuck your backbone
ammeep
671
58k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.9k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.5k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
130
19k
How STYLIGHT went responsive
nonsquared
100
5.6k
Writing Fast Ruby
sferik
628
62k
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 してよりスピーディーに開発をしよう ご利用の際は用法・用量を守って自己責任でご利用ください。 実在の人物や団体、多国籍自動車メーカーなどとは一切関係ありません ご清聴ありがとうございます