Slide 1

Slide 1 text

Test like a team.

Slide 2

Slide 2 text

.。oO(さっちゃんですよヾ(〃l _ l)ノ゙☆)

Slide 3

Slide 3 text

「Testは對話」

Slide 4

Slide 4 text

Test code. test “鳴く” = do meow cat Application code. meow :: Cat -> IO () meow cat = do print “Meow”

Slide 5

Slide 5 text

Application codeはuserの環境で動く。 Test codeはuserの環境で動かない。

Slide 6

Slide 6 text

Application codeはuserの環境で動く。 Test codeはuserの環境で動かない。 ? それはそうだが、 切り口はそれか?

Slide 7

Slide 7 text

Application codeは育つもの。 Test codeはそれを育てるもの。

Slide 8

Slide 8 text

Old `testing` flow. (i.e. regression test, proof) Application code Test code Test code

Slide 9

Slide 9 text

Agile flow. Application code Test code 何をしているの? これでよくない? 難し過ぎ

Slide 10

Slide 10 text

Like pair programming. Guido Gloor Modjib “Pair Programming” (CC BY-NC-ND 2.0) https://flic.kr/p/qAPhza

Slide 11

Slide 11 text

Test code. Application code. meow :: Cat -> IO ()

Slide 12

Slide 12 text

Test code. Application code. meow :: Cat -> IO () meow cat = do print “Meow” 實裝します

Slide 13

Slide 13 text

Test code. test “鳴く” = do assert $ meow cat Application code. meow :: Cat -> IO () meow cat = do print “Meow” 呼び出してみるよ

Slide 14

Slide 14 text

Test code. test “鳴く” = do assert $ meow cat test “鳴き声” do assert (“Meow” == whatMeow cat) Application code. meow :: Cat -> IO () meow cat = do print $ whatMeow cat whatMeow :: Cat -> String whatMeow cat = “Meow” 難し過ぎんよ 任せるよ 何て鳴くの?

Slide 15

Slide 15 text

その行が 何をしてゐるか理解し、 何をすべきか育てる。

Slide 16

Slide 16 text

「Testは對話」

Slide 17

Slide 17 text

https://speakerdeck.com/ne_sachirou/librarywozuo-rutoyun-hukai-fa- shou-fa

Slide 18

Slide 18 text

Can you share any tips or techniques you have found useful in uncovering bugs? I suppose the biggest tip would be to become a better programmer. In particular, study what functions that programs are calling, and ensure that the calling code is following the rules of those functions 100%. (Theo de Raadt, of OpenBSD)