Upgrade to Pro — share decks privately, control downloads, hide ads and more …

TDDワイワイ会

 TDDワイワイ会

TDDワイワイ会で使っている資料です。

https://tddyyx.connpass.com/

Shuhei TAKASUGI

May 19, 2019
Tweet

More Decks by Shuhei TAKASUGI

Other Decks in Programming

Transcript



  1. 5%%ϫΠϫΠձ

    View full-size slide

  2. 5%%ϫΠϫΠձͱ͸
    w5%%ͱϞϒϓϩάϥϛϯάͷ΍ΓํΛ

    ମݧ͢Δ৔Ͱ͢
    wզʑ͸ʮےτϨʯͱݺͿ͜ͱ͕ଟ͍Ͱ͢


    View full-size slide

  3. ֬ೝࣄ߲
    ˞Ϟϒϓϩάϥϛϯάͷ༷ࢠΛ

    ࡱӨ͢Δ͜ͱ͕͋Γ·͢


    ࣸΓͨ͘ͳ͍ํɺෆ౎߹ͷ͋Δํ͸

    ༧Ί͓఻͑Լ͍͞


    View full-size slide

  4. 4/4
    wϋογϡλά͋Γ·͢ʂ


    #tddyyχ
    ͜Ε͸ΤοΫεͰ͸ͳ͘ΧΠͰ͢

    View full-size slide

  5. λΠϜϥΠϯ
    wdΠϯτϩࣗݾ঺հνʔϜ෼͚
    wdΏΔΏΔͱϞϒϓϩάϥϛϯά
    wdதؒ;Γ͔͑Γ
    wdΏΔΏΔͱϞϒϓϩάϥϛϯά
    wd;Γ͔͑Γ


    View full-size slide

  6. 5%%ͱ
    Ϟϒϓϩάϥϛϯά


    View full-size slide

  7. ςετۦಈ։ൃ
    w ʮಈ࡞͢Δ͖Ε͍ͳίʔυʯ

    3PO+F⒎SJFT
    ͕ΰʔϧ


    έϯτɾϕοΫஶ
    ʢ৽༁ʣΦʔϜࣾ
    ݪஶ͸
    ͖Ε͍
    Ԛ͍
    ಈ࡞͠ͳ͍ ಈ࡞͢Δ

    View full-size slide

  8. ςετۦಈ։ൃ
    w ιϑτ΢ΣΞ։ൃʹ͓͚Δෆ҆Λ؇࿨͠
    ͍ͨ
    w z։ൃzʹ͸΋ͪΖΜzઃܭz΋ؚΜͰ͍Δ
    w lઃܭz͸ίʔσΟϯάʹΑͬͯͳ͞ΕΔ
    w গͣͭ͠ઃܭ͠ͳ͕Β࡞ΓࠐΉ


    έϯτɾϕοΫஶ
    ʢ৽༁ʣΦʔϜࣾ
    ݪஶ͸

    View full-size slide

  9. ςετۦಈ։ൃ
    wςετϑΝʔετͷ

    Ξϓϩʔν
    w ςετΛॻ͘ʢϨουʣ
    w ࣮૷͢ΔʢάϦʔϯʣ
    w ͖Ε͍ʹ͢Δ

    ʢϦϑΝΫλϦϯάʣ


    έϯτɾϕοΫஶ
    ʢ৽༁ʣΦʔϜࣾ
    ݪஶ͸

    View full-size slide

  10. ςετۦಈ։ൃ
    w Ϩουɿ

    ಈ࡞͠ͳ͍ɺ͓ͦΒ͘࠷ॳͷ͏ͪ͸

    ίϯύΠϧ΋௨Βͳ͍ςετΛͭॻ͘
    w άϦʔϯɿ

    ͦͷςετΛਝ଎ʹಈ࡞ͤ͞Δɻͱ͖ʹ
    ΠϯνΩͰ΋΍͚ͬͭͰ΋͍͍
    w ϦϑΝΫλϦϯάɿ

    ςετ͕ύεͨ͠··ͷঢ়ଶͰ

    ॏෳΛআڈͨ͠ΓίʔυΛ͖Ε͍ʹ͢Δ


    έϯτɾϕοΫஶ
    ʢ৽༁ʣΦʔϜࣾ
    ݪஶ͸

    View full-size slide

  11. ςετۦಈ։ൃ
    w ϨουɾάϦʔϯɾϦϑΝΫλϦϯάΛ

    ܁Γฦ͠ΠϯΫϦϝϯλϧʹ

    ઃܭɾ࣮૷͍ͯ͘͠


    ͖Ε͍
    Ԛ͍
    ಈ࡞͠ͳ͍ ಈ࡞͢Δ
    Ϩου
    άϦʔϯ
    ϦϑΝΫλϦϯά
    έϯτɾϕοΫஶ
    ʢ৽༁ʣΦʔϜࣾ
    ݪஶ͸

    View full-size slide

  12. 5%%ϫΠϫΠձͰͷ5%%
    w 6ODMF#PC 3PCFSU.BSUJO
    ʹΑΔͭͷϧʔϧʹै͏
    ࣦഊ͢ΔϢχοτςετΛύε͢ΔͨΊ͚ͩʹ͔͠

    ϓϩμΫγϣϯίʔυΛॻ͍ͯ͸ͳΒͳ͍ɻ
    ࣦഊͤ͞Δͷʹे෼ͳϢχοτςετ͕ॻ͚ͨΒ

    ͦΕҎ্ςετίʔυΛॻ͍ͯ͸ͳΒͳ͍ɻ

    ίϯύΠϧΤϥʔ΋ࣦഊͱΈͳ͢ɻ
    ͭͷϢχοτςετΛύεͤ͞Δͷʹे෼ͳίʔυ͕ॻ
    ͚ͨΒͦΕҎ্ϓϩμΫγϣϯίʔυΛॻ͍ͯ͸ͳΒͳ
    ͍ɻ


    “The Three Laws of TDD”
    http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd

    View full-size slide

  13. େࣄʹ͍ͯ͠Δ͜ͱ
    w ;Δ·͍ͷ۩ମྫʹΑͬͯ࢓༷ΛఆΊ͍ͯ͘
    w ࣮૷͔Βߟ͑ͳ͍ʢ5FTU'JSTUʣ
    w 4UFQCZTUFQʢҰ଍ඈͼʹߟ͑ͳ͍ʣ
    w Ϩουʢςετ͕ࣦഊ͍ͯ͠Δঢ়ଶʣ͸ૣ͘ൈ͚Δ
    w άϦʔϯʢςετ͕ಈ࡞Λอূ͍ͯ͠Δঢ়ଶʣ͸҆৺


    View full-size slide

  14. Ϟϒϓϩάϥϛϯάͱ͸


    IUUQTTQFBLFSEFDLDPNUBLBLJOHNPCQSPHSBNNJOHTUBSUVQNBOVBMOVNCFSNPCQSPHSBNNJOH
    OVNCFSNPCVQVSP
    !5",",*/(
    .0#130(3"..*/(
    45"3561."/6"-
    Ϟϒϓϩάϥϛϯά
    ελʔτΞοϓϚχϡΞϧ
    !5",",*/(

    View full-size slide

  15. Ϟϒϓϩάϥϛϯά
    wෳ਺໊Ͱ୆ͷίϯϐϡʔλΛ࢖͍ɺدͬͯͨ
    ͔ͬͯͭͷ͓୊ʹ௅ઓ͢ΔϓϥΫςΟε
    w υϥΠόʔʢਓʣɿߟ͑Λද໌͠ͳ͕ΒखΛಈ͔ͯ͠
    ίʔυΛॻ͘ɻ
    w φϏήʔλʔʢෳ਺ʣɿखΛಈ͔͞ͳ͍͕ҰॹʹίʔυΛ
    ॻ͘ɻόάΛ࢓ࠐ·ͳ͍Α͏ʹ஫ҙͨ͠Γɺ͖᪴Λॿ͚
    ͨΓɺઌճΓͯ͠ௐ΂ͨΓ͢Δɻ
    wਓ̍૊Ͱ΍Δ΋ͷ͸ϖΞϓϩάϥϛϯάͱݴ͏


    View full-size slide

  16. 5%%ϫΠϫΠձͰͷ͓໿ଋ
    wυϥΠόʔ
    w ΍ͬͯΔ͜ͱɺ͜Ε͔Β΍Δ͜ͱΛ੠ʹग़͢ɻ
    wφϏήʔλʔ
    w ͜Ε͔Β΍Δ͜ͱΛܾఆ͢ΔɻυϥΠόͷ΍Δ͜ͱͷ
    ํ޲ੑ͕ؒҧ͍ͬͯͦ͏ͳ৔߹͸मਖ਼Λɺ͍͋ͬͯͦ͏
    ͳ৔߹͸ಉҙΛ͢Δɻ


    View full-size slide

  17. 5%%ϫΠϫΠձͰͷ

    Ϟϒަ୅ํࣜ
    w5%%ͷαΠΫϧͰϨου
    ʹͳͬͨΒަ୅͢Δ
    ςετΛ௨ͨ͢Ίͷ࣮૷Λ
    ͢ΔʢlάϦʔϯʹ͢Δzʣ
    ʢάϦʔϯͷ··ʣϦϑΝ
    ΫλϦϯάΛ͢Δ
    ࣍ʹ࣮૷͢Δ࢓༷Λςετ
    Ͱදݱ͢ΔʢzϨουʹ͢
    Δzʣ


    ͖Ε͍
    Ԛ͍
    ಈ࡞͠ͳ͍ ಈ࡞͢Δ



    View full-size slide

  18. 5%%ϫΠϫΠձͷ

    ඞউύλʔϯ
    wDZCFSEPKPPSHΛ࢖͏
    w ແྉͷ8FC3&1-
    w ͍ΖΜͳݴޠ؀ڥ͕͋Δ
    w ςετϑϨʔϜϫʔΫ͕σϑΥϧτͰଘࡏ
    w໎ͬͨΒ'J[[#V[[
    w ࢓༷͕ཧղ༰қ
    w ͙࣌ؒΒ͍Ͱͬ͘͡Γ΍Δͷʹͪΐ͏Ͳ
    ͍͍
    wഎ৳ͼ͢ΔΦεεϝͷ૊Έ߹Θͤ
    w ஌ͬͯΔ͓୊º஌Βͳ͍ݴޠ
    w ஌Βͳ͍͓୊º஌ͬͯΔݴޠ


    IUUQXXXDZCFSEPKPPSH

    View full-size slide