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
まだまだ間に合う!JUnit 5入門 / JJUG CCC 2018 Spring
Search
Ryo Shindo
May 26, 2018
Programming
6
3.1k
まだまだ間に合う!JUnit 5入門 / JJUG CCC 2018 Spring
JJUG CCC 2018 Spring #ccc_m1
Ryo Shindo
May 26, 2018
Tweet
Share
More Decks by Ryo Shindo
See All by Ryo Shindo
今こそ知りたいSpring Test / Spring Fest 2020
rshindo
11
5.6k
こわくないソースコードリーディング生活 / JJUG CCC 2019 Fall
rshindo
15
9.1k
開発者のためのSpring Boot Actuator入門 / jsug-2019-08
rshindo
5
5.6k
早わかりSpring Data JDBC / jsug-2019-01
rshindo
5
4k
ふつうのJavaアプリ開発のための自動テスト戦略 / JJUG CCC 2018 Fall
rshindo
9
4.8k
Spring WebFluxで学ぶReactive Application / Introduction to Reactive
rshindo
1
2.2k
Spring Data JDBCを使い倒す! / Intruduction to Spring Data JDBC
rshindo
4
2.2k
Other Decks in Programming
See All in Programming
CPython 인터프리터 구조 파헤치기 - PyCon Korea 24
kennethanceyer
0
240
Vue SFCのtemplateでTypeScriptの型を活用しよう
tsukkee
3
1.5k
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
430
PLoP 2024: The evolution of the microservice architecture pattern language
cer
PRO
0
1.6k
Kotlin2でdataクラスの copyメソッドを禁止する/Data class copy function to have the same visibility as constructor
eichisanden
1
140
プロジェクト新規参入者のリードタイム短縮の観点から見る、品質の高いコードとアーキテクチャを保つメリット
d_endo
1
1k
のびしろを広げる巻き込まれ力:偶然を活かすキャリアの作り方/oso2024
takahashiikki
1
410
Android 15 でアクションバー表示時にステータスバーが白くなってしまう問題
tonionagauzzi
0
140
2万ページのSSG運用における工夫と注意点 / Vue Fes Japan 2024
chinen
3
1.3k
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
550
Honoの来た道とこれから
yusukebe
19
3k
cXML という電子商取引の トランザクションを支える プロトコルと向きあっている話
phigasui
3
2.3k
Featured
See All Featured
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
328
21k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
664
120k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Fireside Chat
paigeccino
32
3k
Why You Should Never Use an ORM
jnunemaker
PRO
53
9k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
The Cult of Friendly URLs
andyhume
78
6k
Speed Design
sergeychernyshev
24
570
Optimizing for Happiness
mojombo
376
69k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
22k
Transcript
) ((( # 2 #
8 1 1 8 82 C @A 08 8
• •
• • ) ( J • Copyright © Acroquest Technology Co., Ltd. All rights reserved. 2
6 2 . 36 3 . 4 6 .
4 6 7 1 4 6 5 . Copyright © Acroquest Technology Co., Ltd. All rights reserved. 3
Copyright © Acroquest Technology Co., Ltd.
All rights reserved. 4
Copyright © Acroquest Technology Co., Ltd. All rights reserved. 5
Copyright © Acroquest Technology Co., Ltd.
All rights reserved. 6
Copyright © Acroquest Technology
Co., Ltd. All rights reserved. 7
• 040 JIDJ 9 7 7
• 21 7 • UU7D • .+ 7 I G a • • 89 A7 P K Copyright © Acroquest Technology Co., Ltd. All rights reserved. 8
Copyright © Acroquest Technology Co.,
Ltd. All rights reserved. 9
Copyright © Acroquest Technology Co., Ltd. All rights
reserved. 10
Copyright © Acroquest Technology Co., Ltd. All rights
reserved. 11
% Copyright © Acroquest Technology Co., Ltd. All rights
reserved. 12 !#&"$&
/ E D I I
E 8 E d R 8 R ,522.3 ,51.4 k l 8 8 + e j Copyright © Acroquest Technology Co., Ltd. All rights reserved. 13
Copyright © Acroquest Technology Co., Ltd. All rights
reserved. 14
Copyright © Acroquest Technology Co., Ltd. All rights
reserved. 15 . . 2 . . 1/4 4. 1/4 1 4. 1 12 /. 12 /. 2 / 2 2 / . . . . 2
- - - - - . /
- . / . Copyright © Acroquest Technology Co., Ltd. All rights reserved. 16
- - - - - . /
- . / . Copyright © Acroquest Technology Co., Ltd. All rights reserved. 17 … 2 …
• ( ) A • J P A
5 • I 5 Copyright © Acroquest Technology Co., Ltd. All rights reserved. 18
Copyright © Acroquest Technology
Co., Ltd. All rights reserved. 19 , 4 3 if d d ifgP m IUT 4 c Bcjn D U E eMl E @ @ a d @ 3 3 hJE - eM - l S d d
Copyright © Acroquest Technology Co., Ltd.
All rights reserved. 20
Copyright © Acroquest Technology Co., Ltd. All
rights reserved. 21
. 5 3 - 1 O 6 5
6 5 1 1 35 1 6 5 - 2 - 41 - 1 6 5 - 2 125 1 5 1 - 1 6 5 - 2 3 - 1 35 - 1 (M - 5 1 B O Copyright © Acroquest Technology Co., Ltd. All rights reserved. 22 G a ) )5 2 - 1 5- B b
Copyright © Acroquest Technology Co., Ltd. All
rights reserved. 23
Copyright © Acroquest Technology Co., Ltd. All
rights reserved. 24 ) ( ) ) ( ( ( (
)
Copyright © Acroquest Technology Co., Ltd. All rights reserved. 25 A A ( ) ;
) ) )
( ) ) ( ) ) ( ) ) ) ( Copyright © Acroquest Technology Co., Ltd. All rights reserved. 26
)
) Copyright © Acroquest Technology Co., Ltd. All rights reserved. 27 ( )
" " ( ) ) ( Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 28 @ " ( ) ) (
-2 = 0 1
@ = .0= . ) ,.=3 ( . 2;= . ;2 = ( -2 = 0 1 @ = .0= . ) ,.=3 . ( . 2;= . .0= . ( Copyright © Acroquest Technology Co., Ltd. All rights reserved. 29
= A ; @
@= A ;; @ = @ 2 A =1 ; 0 @=1 ;; @ @ E = ; . = " ( ) AA @ - ;A " ; ) A N N M 2 A A1 ; 0 @=, A ; 3 ; E = ; . A ) AA @ - ;A " ; ) Copyright © Acroquest Technology Co., Ltd. All rights reserved. 30
Copyright © Acroquest Technology Co., Ltd.
All rights reserved. 31 Maven Surefire @DisplayName
Copyright © Acroquest Technology Co., Ltd.
All rights reserved. 32
Copyright © Acroquest Technology Co., Ltd. All rights
reserved. 33
Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 34
)-2 ; 1 ;2 ; >
. 2 ; . " . 2 ; . , ; . 2 . 2 " " Copyright © Acroquest Technology Co., Ltd. All rights reserved. 35 )-2 ; 1 ;2 ; > . 2 ; . " . 2 ; . " " , ; . 2 . 2 . 2 ; . " " ( , ; . 2 . 2
)1 B D3; E B
D; 0 D =. = , ; ; ( B = BB ,@D ;B . = " ; B = BB ,@D ;B " ; ; B = BB ,@D ;B " ; Copyright © Acroquest Technology Co., Ltd. All rights reserved. 36 assert assert
> E A >D . 1 ; . ;
1 ( = = = . =). - . ;)33 , . " ( - . ; -3 , " . 3 .. ; - . " ( - . ; -3 . " . 3 .. 3- ; - . " ( - . ; -3 " . 3 .. -0. Copyright © Acroquest Technology Co., Ltd. All rights reserved. 37 OK assertAllOK
Copyright © Acroquest
Technology Co., Ltd. All rights reserved. 38
/ /= / /. ( 1 0
/ 1 )= / 1 1 ; 1. 0 . 0 ( 1 0 / 1 )= / 1 1 Copyright © Acroquest Technology Co., Ltd. All rights reserved. 39 / A @ E @
( BC <; E>; B > <
A> = C > = B, C;>= I CA I )AA .;BC CA;= BA = )AA .;BC BA > )AA .;BC CA;= BC = )AA .;BC ><< C;>=B > BC" BA ;< , C;>= =>C C A> = C = C > = B, C;>= I BB AC,@ <B > A > B =>C ;C ;= BC " C BB Copyright © Acroquest Technology Co., Ltd. All rights reserved. 40 M L O ;< S OT C
C B ( @ ; ;A >; )>
A @ <@ ; )>> E, @ .@> > )>> E, @ > ; )>> E, @ .@> @ )>> E, @ = ; ; )=. - , = ; ; )=. . - ( . . > . >@ =A .;A> ; ;@ @ @ " @ Copyright © Acroquest Technology Co., Ltd. All rights reserved. 41 c I c M S L Ta
Copyright © Acroquest Technology Co., Ltd. All
rights reserved. 42
Copyright © Acroquest Technology Co., Ltd. All
rights reserved. 43
Copyright © Acroquest Technology Co., Ltd. All rights reserved.
44
Copyright © Acroquest Technology Co., Ltd. All rights
reserved. 45
Copyright © Acroquest Technology Co.,
Ltd. All rights reserved. 46
( ) ) Copyright © Acroquest Technology
Co., Ltd. All rights reserved. 47
B @ . .( ) ( =.
3 ;; , ; @ =. 3 ; 3 ;; E @ ), ; =. 3 30 @ 3 = 2 ;; = ; = ), ; =. 3 30 @ 3 = 2 ;; = ; = =. 3 ; 3 ;; E @ Copyright © Acroquest Technology Co., Ltd. All rights reserved. 48 ah T d; 3 eh , ; M Ei l c abT
=. 3 ;; , ; @
(, ; 30 ib @ 3 = 2 ;; = ; = ;; e @ (, ; 30 . aE @ 3 = 2 ;; = ; = (, ; 30 ) c @ 3 = 2 ;; = ; = Copyright © Acroquest Technology Co., Ltd. All rights reserved. 49 B M @NestedT dh M T
=. 3 ;; , ; @
(, ; 30 @ 3 = 2 ;; = ; = ;; T @ (, ; 30 . M B @ 3 = 2 ;; = ; = (, ; 30 ) M EB @ 3 = 2 ;; = ; = Copyright © Acroquest Technology Co., Ltd. All rights reserved. 50
Copyright © Acroquest Technology Co., Ltd. All rights
reserved. 51
Copyright © Acroquest Technology
Co., Ltd. All rights reserved. 52
). ) ( @ 9 92 ;
29,2 6.6 . @ 9 2 01 62= (( D) ). .6 @ 9 ; 5 62= ; 29,2 6 9; 29,2 6 ; 29,2 6 ; 62= ) 2 6= .=@6 9; 29,2 6 62 62= ) D D Copyright © Acroquest Technology Co., Ltd. All rights reserved. 53 2
- / . / . / .
/ ./ ./ / Copyright © Acroquest Technology Co., Ltd. All rights reserved. 54 /.
D 8 >9 9 7 2; 1B97
07 ;5; ( = 2 = ( , 1 9= @ " " B> S Y > ;7D 1B97 07 ; B97 07 ; 1B97 07 ; B< ;7D 7 ;D 5D ; B97 07 ; > 1;7 6;7D L ( = 2 = ( = 2, 1 0 ) = B> > ;<BD; =B ; D 5D ; 1B97 07 ; B =;D 1B97 07 ; B 7 1B97 07 ; B< ) 7 ;D 5D ; B 7 > ;<BD; B =;D L 7 >9 D;7 ,1B97 07 ;. 8;<BD;07 ; D; D D;7 B< 1B97 07 ; B< ) ( 1B97 07 ; B< ) 1B97 07 ; B< L L Copyright © Acroquest Technology Co., Ltd. All rights reserved. 55 <79 BD ; =B dTcb S RY d a N
$ "! # Copyright © Acroquest Technology Co.,
Ltd. All rights reserved. 56 Source @ValueSource @ValueSource(strings = { “foo”, “bar” }) @EnumSource @EnumSource(value = OS.class, names = {“LINUX”, “MAC”}) @MethodSource Stream staticfactory method @CsvSource @CsvSource({ "foo, bar" }) @CsvFileSource @CsvFileSource(resources = { “/employees.csv” }, numLinesToSkip = 1) void test(String name, int age) { … } @ArgumentsSource ArgumentsProvider ! @ArgumentsSource(MyArgumentsProvider.class)
Copyright © Acroquest Technology Co., Ltd. All rights
reserved. 57
), W Tom Re r dFJ
• h UW Tip • a cd lE @ • h 8 R • 8 . ( 4 8 8 n J R Copyright © Acroquest Technology Co., Ltd. All rights reserved. 58
Copyright © Acroquest Technology Co., Ltd. All rights
reserved. 59 Runner Rule Extension
J 5 eo M b C 5 i
T C • dp UhR J aH @ fk • , ,55 , , 5 M nl E W B • c dp H Copyright © Acroquest Technology Co., Ltd. All rights reserved. 60
C ; ; AA C@ = =A =
; = A ( : : ). . : ). . @ D A = ; - A -(, () - A @ C@ = .D @@ C ; D @ A C = =A =) = = @ EA = = @ -(, () C A @ " A C@@ = , ;; A .D @@ C ; D @ A C = =A =) = = @ EA = ; = A @ ; = = @ -(, () A @ ; = C@ = A C@@ = , ;; A A @ ,A : ; , : . . : % . : "" = @ -(, () @ D A @ Copyright © Acroquest Technology Co., Ltd. All rights reserved. 61 NOP M
( ) . ( : . 5 1
1 1 50 1 1 50 @ 1 ; @ ) 1: 5 ;1 0 11: Copyright © Acroquest Technology Co., Ltd. All rights reserved. 62 ( ; 5 ( ; 5
- '") Copyright © Acroquest Technology Co., Ltd. All
rights reserved. 63 interface &*# BeforeAllCallback ! # BeforeEachCallback ! # +@BeforeEach , BeforeTestExecutionCallback ! # +@BeforeEach @Test , TestExecutionExceptionHandler %*$(* ExecutionCondition ! # ,
Copyright © Acroquest Technology Co., Ltd. All
rights reserved. 64
. 4 J 4 1 J 4
2455 Copyright © Acroquest Technology Co., Ltd. All rights reserved. 65
• R B • , E •
, • - T E , @ E Copyright © Acroquest Technology Co., Ltd. All rights reserved. 66
• 3/ 1 -4 2 3/ 3/
P J P • 3/ /3 . 3./3 J 3 3 a 3/ U d a • 3/ 1 -4 2 c P J Copyright © Acroquest Technology Co., Ltd. All rights reserved. 67
Copyright © Acroquest Technology Co., Ltd.
All rights reserved. 68 JUnit Platform JUnit Jupiter JUnit Vintage
• n V g i5 e •
4 • J U 4a / Copyright © Acroquest Technology Co., Ltd. All rights reserved. 69
Copyright © Acroquest Technology Co., Ltd. All rights reserved.
70
• h I : A : • j d )
P IE • ) ( I cg • e D P i / 5. 55- -5 . - Copyright © Acroquest Technology Co., Ltd. All rights reserved. 71