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
240
1
Share
pass the test
「第8回ゆるはち.it: CI/CDについてゆるく話す」
LT: TestをPassしよう!
https://yuruhachi-it.connpass.com/
sakakendo0321
March 27, 2019
More Decks by sakakendo0321
See All by sakakendo0321
meister chapter4
sakakendo0321
0
32
Introducing static site
sakakendo0321
0
38
open source 2
sakakendo0321
0
54
inner study
sakakendo0321
1
69
meister 2018 final
sakakendo0321
0
39
Other Decks in Technology
See All in Technology
60分で学ぶ最新Webフロントエンド
mizdra
PRO
34
18k
職能の壁を取り払った先で見えた壁 -AI時代のクロスファンクショナル組織-
shimotaroo
1
120
Azure Lifecycle with Copilot CLI
torumakabe
3
1k
Master Dataグループ紹介資料
sansan33
PRO
1
4.6k
AgentCore×VPCでの設計パターンn選と勘所
har1101
3
260
LLM時代の検索アーキテクチャと技術的意思決定
shibuiwilliam
3
1k
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
4.3k
Bill One 開発エンジニア 紹介資料
sansan33
PRO
6
18k
インターネットの技術 / Internet technology
ks91
PRO
0
190
Claude Code を安全に使おう勉強会 / Claude Code Security Basics
masahirokawahara
6
25k
KGDC_13_Amazon Q Developerで挑む! 13事例から見えたAX組織変革の最前線_公開情報
kikugawa
0
110
20260423_執筆の工夫と裏側 技術書の企画から刊行まで / From the planning to the publication of technical book
nash_efp
3
370
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
187
22k
Thoughts on Productivity
jonyablonski
76
5.1k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
27
3.4k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.9k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
370
Building Adaptive Systems
keathley
44
3k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
43k
Documentation Writing (for coders)
carmenintech
77
5.3k
Statistics for Hackers
jakevdp
799
230k
KATA
mclloyd
PRO
35
15k
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 してよりスピーディーに開発をしよう ご利用の際は用法・用量を守って自己責任でご利用ください。 実在の人物や団体、多国籍自動車メーカーなどとは一切関係ありません ご清聴ありがとうございます