Submit Search
Upload
Junit intro
•
1 like
•
1,886 views
Yutaka Kinjyo
Follow
Technology
Education
Report
Share
Report
Share
1 of 24
Download now
Download to read offline
Recommended
Junit4
Junit4
ichikaz3
Rest is 何
Rest is 何
Yutaka Kinjyo
Selenium webdriver使ってみようず
Selenium webdriver使ってみようず
Oda Shinsuke
Live
Live
Yutaka Kinjyo
ホームディレクトリに埋もれた便利なコードをさがせ!
ホームディレクトリに埋もれた便利なコードをさがせ!
Yohei Fushii
コーディング入門以前
コーディング入門以前
Yutaka Kinjyo
会社に Github導入した話
会社に Github導入した話
Yutaka Kinjyo
RESTfulとは
RESTfulとは
星影 月夜
Recommended
Junit4
Junit4
ichikaz3
Rest is 何
Rest is 何
Yutaka Kinjyo
Selenium webdriver使ってみようず
Selenium webdriver使ってみようず
Oda Shinsuke
Live
Live
Yutaka Kinjyo
ホームディレクトリに埋もれた便利なコードをさがせ!
ホームディレクトリに埋もれた便利なコードをさがせ!
Yohei Fushii
コーディング入門以前
コーディング入門以前
Yutaka Kinjyo
会社に Github導入した話
会社に Github導入した話
Yutaka Kinjyo
RESTfulとは
RESTfulとは
星影 月夜
一度死んだ話
一度死んだ話
Yutaka Kinjyo
Deepsmarts
Deepsmarts
Yutaka Kinjyo
The dankai
The dankai
Yutaka Kinjyo
IeLt2014
IeLt2014
Yutaka Kinjyo
ちょっと怖くなくったRails
ちょっと怖くなくったRails
Yutaka Kinjyo
怖いRails
怖いRails
Yutaka Kinjyo
コンテキストと文化
コンテキストと文化
Yutaka Kinjyo
開発チームのためのコミュニケーションとコンテキストの作り方
開発チームのためのコミュニケーションとコンテキストの作り方
Yutaka Kinjyo
Ie lt
Ie lt
Yutaka Kinjyo
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
Hiroki Ichikura
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Daniel
danielhu54
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
Toru Tamaki
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
sugiuralab
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
Ryo Sasaki
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
iPride Co., Ltd.
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
Toru Tamaki
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
taisei2219
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Yuma Ohgami
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
Toru Tamaki
More Related Content
More from Yutaka Kinjyo
一度死んだ話
一度死んだ話
Yutaka Kinjyo
Deepsmarts
Deepsmarts
Yutaka Kinjyo
The dankai
The dankai
Yutaka Kinjyo
IeLt2014
IeLt2014
Yutaka Kinjyo
ちょっと怖くなくったRails
ちょっと怖くなくったRails
Yutaka Kinjyo
怖いRails
怖いRails
Yutaka Kinjyo
コンテキストと文化
コンテキストと文化
Yutaka Kinjyo
開発チームのためのコミュニケーションとコンテキストの作り方
開発チームのためのコミュニケーションとコンテキストの作り方
Yutaka Kinjyo
Ie lt
Ie lt
Yutaka Kinjyo
More from Yutaka Kinjyo
(9)
一度死んだ話
一度死んだ話
Deepsmarts
Deepsmarts
The dankai
The dankai
IeLt2014
IeLt2014
ちょっと怖くなくったRails
ちょっと怖くなくったRails
怖いRails
怖いRails
コンテキストと文化
コンテキストと文化
開発チームのためのコミュニケーションとコンテキストの作り方
開発チームのためのコミュニケーションとコンテキストの作り方
Ie lt
Ie lt
Recently uploaded
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
Hiroki Ichikura
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Daniel
danielhu54
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
Toru Tamaki
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
sugiuralab
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
Ryo Sasaki
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
iPride Co., Ltd.
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
Toru Tamaki
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
taisei2219
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Yuma Ohgami
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
Toru Tamaki
Recently uploaded
(10)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Daniel
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
Junit intro
1.
JUnit入門 Yutaka Kinjo
2.
JUnit A programmer-oriented testing framework
for Java
3.
Standard Method assertThat(actual, is(expected));
4.
Standard Method assertThat(actual, is(expected)); 実際の値
期待値
5.
assertThat(actual, is(expected)); 実際の値 期待値 ex.加算用のメソッドをテストする時 1
+ 2 = 3 の場合、3を期待値とすると Standard Method
6.
Add Method Test @Test public
void addで1と2の加算結果が返却される() { ! int a = 1; int b = 2; int expected = 3; Calc sut = new Calc(); int actual = sut.add(a,b); ! assertThat(actual ,is(expected)); テスト結果 Green or Red
7.
Test result テスト成功 テスト失敗
8.
Test result テスト失敗 Expected: is
<3> but: was <-1>
9.
Add Method public int
add(int a, int b) { return a - b; } public int add(int a, int b) { return a + b; } テスト結果 Green
10.
Routine テスト 修正 一度書けば何度でもテスト可能
11.
Routine テスト 修正 テストの実行は軽量(対象のメソッドだけ) 高速なデバックが可能になる!!
12.
What is Matcher
?
13.
Standard Method assertThat(actual, is(expected)); Matcher actual
is expected が真なら Green
14.
Matcher Method is not nullValue notNullValue sameInstance instanceOf
15.
Matcher Method assertThat(actual, is(expected)); assertThat(actual,
not(expected)); : actual と expected が同じ値なら Greenis not : actual と expected が違う値なら Green
16.
Matcher Method assertThat(actual, nullValue()); assertThat(actual,
notNullValue()); : actual が null なら GreennullValue notNullValue : actual が null でないなら Green
17.
Matcher Method assertThat(actual,sameInstance(expected)); assertThat(actual,instanceOf(expected)); : actual
と expected が 同じインスタンスなら Green sameInstance instanceOf : actual が expected で 指定したインスタンスなら Green
18.
What is Annotation
?
19.
Annotation 日本語だと「注釈」
20.
Annotation @Test public void addで1と2の加算結果が返却される()
{ ! int a = 1; int b = 2; int expected = 3; Calc sut = new Calc(); int actual = sut.add(a,b); ! assertThat(actual ,is(expected)); Test 対象のメソッドを示す
21.
Annotation @Test @Before @After @BeforeClass @AfterClass @Ignore
22.
Annotation @Test : テスト対象を示す @Before
: テストメソッドの前に毎回実行される @After : テストの後に毎回実行される @BeforeClass : テストクラスの前に実行される @AfterClass : テストクラスの後に実行される @Ignore : テスト対象でないことを示す
23.
JUnit入門 Key word assertThat matcher annotation TDD
24.
What is TDD
? http://www.slideshare.net/t_wada/ devlove2012-twada-tdd
Download now