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
VRTやってますか?reg-suitですか?
Search
ANDPAD inc
March 05, 2021
Programming
1
2.6k
VRTやってますか?reg-suitですか?
2021/03/05 ANDPAD TechLive #4 ANDPAD FrontEnd NOW!!
ANDPAD inc
March 05, 2021
Tweet
Share
More Decks by ANDPAD inc
See All by ANDPAD inc
Amplify で SPA をホスティングする際の注意点
andpad
0
14
マルチプロダクト開発の現場でAWS Security Hubを1年以上運用して得た教訓
andpad
0
56
rails stats で紐解く ANDPAD のイマを支える技術たち
andpad
1
390
本編では話さない Zig の話
andpad
2
240
"noncopyable types" の使いどころについて考えてみた
andpad
0
380
ANDPAD黒板のオフラインモード機能 リリースまでの軌跡
andpad
0
250
アンドパッドのマルチプロダクト戦略を支える SRE
andpad
1
240
Introduction of Cybersecurity with OSS (RDRC2024)
andpad
1
69
開発チームとともに進めるインフラセキュリティの継続的な改善
andpad
2
110
Other Decks in Programming
See All in Programming
SpringBoot3.4の構造化ログ #kanjava
irof
2
1k
Spring gRPC について / About Spring gRPC
mackey0225
0
220
データベースのオペレーターであるCloudNativePGがStatefulSetを使わない理由に迫る
nnaka2992
0
170
Rubyで始める関数型ドメインモデリング
shogo_tksk
0
120
ファインディLT_ポケモン対戦の定量的分析
fufufukakaka
0
740
Conform を推す - Advocating for Conform
mizoguchicoji
3
690
『テスト書いた方が開発が早いじゃん』を解き明かす #phpcon_nagoya
o0h
PRO
2
290
仕様変更に耐えるための"今の"DRY原則を考える / Rethinking the "Don't repeat yourself" for resilience to specification changes
mkmk884
2
550
社内フレームワークとその依存性解決 / in-house framework and its dependency management
vvakame
1
560
Honoをフロントエンドで使う 3つのやり方
yusukebe
7
3.3k
Serverless Rust: Your Low-Risk Entry Point to Rust in Production (and the benefits are huge)
lmammino
1
110
Grafana Loki によるサーバログのコスト削減
mot_techtalk
1
130
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
GitHub's CSS Performance
jonrohan
1030
460k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
Making Projects Easy
brettharned
116
6k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Site-Speed That Sticks
csswizardry
4
380
Optimizing for Happiness
mojombo
376
70k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
The Invisible Side of Design
smashingmag
299
50k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
The World Runs on Bad Software
bkeepers
PRO
67
11k
Transcript
VRTやってますか? reg-suitですか? ANDPAD TechLive #4 Yuki Ichikawa
自己紹介 市川夕貴(いっちー) @ebizo-0202 施工管理Nuxt化 & 新機能開発 好きな声優:水樹奈々さん
VRTやってますか?
VRTとは - Visual Regression Test - 画像回帰テスト - 現在の正しいコンポーネントやページのスクリーンショットと開発中の スクリーンショットを比較して差分を検知するテスト
- ANDPAD 施工 Nuxt 化チームでは Storybook + Strorycap + reg-suit + S3 + CircleCI で実現している
None
None
None
None
None
None
None
None
None
None
None
None
VRTを運用していて感じること - コンポーネントの変更によって生じる差分が意図的なものかど うかが、ひと目で判断できるので安心感がある - story を書かないと VRT が出来ないので Storybook
のメンテ ナンスのモチベーションになる
今日お話するのは運用する中でのひとコマ
ある日、reg-suit が おかしな差分を検知するようになったんです
様子がおかしくなったのは dependabot で とある Pull Request が作られたとき
None
None
None
パッケージアップデートの Pull Request で 差分が出ることは「まれによくある」
実際に差分を見てみましょう
None
詳細を見てみましょう
None
None
None
None
もう1つ詳細を見てみましょう
None
None
None
None
None
なるほど、わからん
Release notes を見てみよう
None
None
config.matchingThreshold が未定義の場合に 差異を抑制するバグを修正しました
None
なるほど
regconfig.json を見てみよう
None
matchingThreshold 無いねぇ
つまり、今まで抑制されていた差分が Bug fix によって顕在化したってこと?
とりあえず merge してみて様子を見よう
None
None
eslint のプラグインのアップデートで コンポーネントの差分でるのは流石におかしいねぇ
他の Pull Request でも意図していない差分が 検知されてノイズになっちゃってるねぇ
None
直そう
とりあえず reg-suit の設定を見直そう
もう一度 regconfig.json を見てみよう
None
reg-suit の README を見てみよう
None
thresholdRate
全体に対する差異が発生したピクセル数の比率のしきい値。 0か ら1の範囲である必要があります。
これがあやしい
今まで thresholdRate: 0 というとても厳しい「しきい値」で差分の検知を していたけど、バグで差分が出てこなかったのでは
None
None
意図していない差分が出なくなった!
🎉
運用する中でのひとコマをお届けしましたが
VRT はいいぞ - コンポーネントの変更によって生じる差分が意図的なものかど うかが、ひと目で判断できるので安心感がある - story を書かないと VRT が出来ないので
Storybook のメンテ ナンスのモチベーションになる - thresholdRate は適切な値を設定しよう - 今回の小話が VRT をしている/しようとしている誰かの知見に なればなぁ
ご清聴ありがとうございました!