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
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
210
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
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
520
立川で超かぐや姫!について話したい / Talking Cosmic Princess Kaguya! in Tachikawa
contour_gara
1
330
AR グラス + ミニ PC で実現する新しいモバイル環境
contour_gara
0
330
TDD 実践ミニトーク
contour_gara
1
420
Spring Boot と AWS S3 を使ったアプリケーションのテスト
contour_gara
0
140
ノート PC に Linux 入れてみたけど結構良かった
contour_gara
0
3.5k
社外での学びを社内に還元したい
contour_gara
1
550
2 週間で Twitter Bot を作ってみた
contour_gara
0
1.3k
Database Rider を用いたデータベーステスト
contour_gara
0
480
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
Faster Mobile Websites
deanohume
310
31k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
150
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
160
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
190
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
Discover your Explorer Soul
emna__ayadi
2
1.1k
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