Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
JUnit5 から Kotest へ
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Daisuke Garaike
July 10, 2024
220
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
JUnit5 から Kotest へ
Daisuke Garaike
July 10, 2024
More Decks by Daisuke Garaike
See All by Daisuke Garaike
Go を使い始めて 2 ヶ月の学び / My first two months with Go
contour_gara
0
430
S3 を使うアプリケーションをローカル完結で動かすことに全力を注いでみた / Running S3 Apps Offline
contour_gara
0
860
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
730
立川で超かぐや姫!について話したい / Talking Cosmic Princess Kaguya! in Tachikawa
contour_gara
1
460
AR グラス + ミニ PC で実現する新しいモバイル環境
contour_gara
0
390
TDD 実践ミニトーク
contour_gara
1
440
Spring Boot と AWS S3 を使ったアプリケーションのテスト
contour_gara
0
170
ノート PC に Linux 入れてみたけど結構良かった
contour_gara
0
3.7k
社外での学びを社内に還元したい
contour_gara
1
600
Featured
See All Featured
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
450
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
520
Product Roadmaps are Hard
iamctodd
55
13k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
290
Unsuck your backbone
ammeep
672
58k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.2k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Agile that works and the tools we love
rasmusluckow
331
22k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
67
58k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Transcript
JUnit5 から Kotest へ 2024-05-10 Kotlin Fest アフターパーティー@コドモン Daisuke Garaike
自己紹介 gara Twitter: @contour_gara GitHub: contour-gara Java で百貨店システムの開発 業務外では Kotlin
2
印象に残ったセッション Kotest を使ってみる! 3
Spec は WordSpec に テスト名を仕組みとして決めることができる。 保存メソッドの場合 4
リポジトリのテスト インフラ プレゼン ユースケース ドメイン DB H2 コンテナ ローカル 開発生産性の観点から考える自動テスト(2024/06版)
より https://speakerdeck.com/twada/automated-test-knowledge-f rom-savanna-202406-findy-dev-prod-con-edition?slide=32 5 モック DB
データ投入 & テーブルのアサーションライブラリ Database Rider • アノテーション • データ投入 ◦
YAML ファイルで 定義 ◦ 実行前にデータ削除 • テーブルアサーション • Kotest では 使用できない DbSeup • コード • データ投入 • データ削除 AssertJ-DB • コード • テーブルアサーション 6
データ投入 7
テーブルアサーション 8
データ削除 9 テスト・ケースの実行前にデータの後始末を行う 単体テストの考え方/使い方 p. 350 DbSetup ユーザーガイドでも、空のデータベースから 始めて最後に消すことを否定している。 https://dbsetup.ninja-squad.com/user-guide.html
まとめ • Kotest へ移行することでテスト名に一貫性をもたせる ことができた。 • Kotest でもリポジトリのテストはできた。 ◦ みなさんのリポジトリテストを教えてほしいです。
参考: https://github.com/contour-gara/gara-photo-spring-boot 10