SlideShare une entreprise Scribd logo
1  sur  17
Télécharger pour lire hors ligne
はじめに
•弊社自社サービス sopra を開発したときの話
が中心です。
http://sopra.jp/
•テストコードの話をしますが、いわゆる
How To 的な話ではなくて、実際のプロダク
トでどういった部分にテストを書くと効果的
なのか、といった話をします。
自己紹介
•@imunew
•2013年5月からヒトメディアにて副CTO
•ヒトメディア以前は、
MJS→JIC→FSI→gloopsと転々と
•ヒトメディアでは、コードも書きますが、
見積書や請求書も書きますし、経営資料も作
ります。エンジニアの面談もやります。
Symfony勉強会 #8
•ヒトメディアに入社したばかりの頃。
社内のプロダクトはSymfony1.4で作られた
ものがほとんど。
2系に移行したいと思っていたのでエンジニ
アを2名連れて参加してみた。
•この勉強会をきっかけに、Symfony2.3、
Silexを使ってプロダクトを複数開発していま
す。
2013年7月
•Silexで Console Application + Web な管理
サイト作った後に、自社サービスとして社会
人向け映像学習サービス「sopra」を開発す
ることに。
•2013年1月から企画はあったが、メインの受
託開発でそれどころではなく、Wordpress +
Membership プラグインで作るみたいな構想
だった。
Wordpress...
•Wordpressレガシーすぎる
http://mask-legacy.tumblr.com/post/62315583278/in-wordpress-phpcon2013-wctokyo
(レガシーコード in WordPress)
•基本ブログ以外の用途には使えないと思った
ほうがいい
•Wordpress案を捨てて、Symfony2で作る判
断をしたときに既に7月下旬、9月中旬リリー
スだから実質1ヶ月ちょっとしかない
とにかく作ろう
•エンジニア3人で開発
•この段階ではテストコード無し
•Symfony2学習コストそれなりに高い
•ページによって非ログイン状態でもページ見
せたいだけなのに
anonymous: にたどり着くまで2日はかか
た気が
2013年9月13日
正式リリースに向けて
•プレオープン時は全コンテンツ無料だが、
正式リリースでは月額課金にして有料コンテ
ンツを配信
•課金周りの実装を担当
•会員登録した月のみ初月無料特典がある。
•その他、授業や動画をクリップできたり、コ
メントやレーティングできたりとプレオープ
ンに間に合わなかった機能を実装
月額課金以外と大変
決済処理のパターン多い
いわゆる状態遷移モデル
そうだテスト書こう
•phpunitのインストール
•はじめはControllerのテストから
•ログインしたことにして
ページ遷移して
formに値セットして
submitして
crawlerで画面表示項目をチェック
状態が期待通り遷移しているかチェック
モックも使ってみよう
•決済処理には多くのエラーケースが存在する
•カードの有効期限切れなどは、故意に発生さ
せにくい
•モックオブジェクトに任意のエラーを返して
もらおう
•決済会社が用意してくれているテスト環境で
は出せないエラーでも自由自在だし、そこは
テストの範囲ではない
テストでハマったところ
•ページ遷移したときに、entityManager使い
まわしていると、例外発生したので、ページ
遷移後にインスタンスを再生成することに
•FixtureBundleでデータを投入する前に、
truncate tableしたいのに、関数が用意され
ていないので、実装
•技術的な部分はblogにまとめてあります。
http://imunew.github.io/blog/
2013年11月1日
無事、正式リリース
そして2014年
•3月、大人の事情により、課金バッチ停止
5月中旬まで全ての動画を無料で公開してま
す。
•5月末にアップデートを行い、授業個別での課
金に変更する予定です。
•新たな決済処理でも懲りずにテストコード書き
ます。
ステマ要素満載ですが
•sopra.jp 今なら全ての動画が無料で視聴可能
ですので、ぜひ会員登録をよろしくお願いしま
す。
ご清聴ありがとうございました。

Contenu connexe

En vedette

Indian Patent Examination Guidelines for Pharmaceutical Patents issued by IPO...
Indian Patent Examination Guidelines for Pharmaceutical Patents issued by IPO...Indian Patent Examination Guidelines for Pharmaceutical Patents issued by IPO...
Indian Patent Examination Guidelines for Pharmaceutical Patents issued by IPO...
Prity Khastgir IPR Strategic India Patent Attorney Amplify Innovation
 
Navigating Patents- Law and Process to File
Navigating Patents- Law and Process to FileNavigating Patents- Law and Process to File
Navigating Patents- Law and Process to File
Incuba8
 
Intellectual property rights(I.P.R.) and traditional knowledge protection of ...
Intellectual property rights(I.P.R.) and traditional knowledge protection of ...Intellectual property rights(I.P.R.) and traditional knowledge protection of ...
Intellectual property rights(I.P.R.) and traditional knowledge protection of ...
Abhishek Singh
 
Bhagawadgita by artaya honest2
Bhagawadgita by artaya honest2Bhagawadgita by artaya honest2
Bhagawadgita by artaya honest2
Artaya Honest
 
ISDR Presentation - CRIT 2012
ISDR Presentation - CRIT 2012ISDR Presentation - CRIT 2012
ISDR Presentation - CRIT 2012
Surachai Rodsai
 
Ringkasan mahabrata by artaya honest
Ringkasan mahabrata by artaya honestRingkasan mahabrata by artaya honest
Ringkasan mahabrata by artaya honest
Artaya Honest
 
Tugas 4 pemorgraman orintasi objek membuat array dua dimensi program java-art...
Tugas 4 pemorgraman orintasi objek membuat array dua dimensi program java-art...Tugas 4 pemorgraman orintasi objek membuat array dua dimensi program java-art...
Tugas 4 pemorgraman orintasi objek membuat array dua dimensi program java-art...
Artaya Honest
 

En vedette (13)

Symfony勉強会#9 form
Symfony勉強会#9 formSymfony勉強会#9 form
Symfony勉強会#9 form
 
Indian Patent Examination Guidelines for Pharmaceutical Patents issued by IPO...
Indian Patent Examination Guidelines for Pharmaceutical Patents issued by IPO...Indian Patent Examination Guidelines for Pharmaceutical Patents issued by IPO...
Indian Patent Examination Guidelines for Pharmaceutical Patents issued by IPO...
 
Navigating Patents- Law and Process to File
Navigating Patents- Law and Process to FileNavigating Patents- Law and Process to File
Navigating Patents- Law and Process to File
 
管理画面のアクセスコントロール
管理画面のアクセスコントロール 管理画面のアクセスコントロール
管理画面のアクセスコントロール
 
UNCTAD (IBE)
UNCTAD (IBE)UNCTAD (IBE)
UNCTAD (IBE)
 
Intellectual property rights(I.P.R.) and traditional knowledge protection of ...
Intellectual property rights(I.P.R.) and traditional knowledge protection of ...Intellectual property rights(I.P.R.) and traditional knowledge protection of ...
Intellectual property rights(I.P.R.) and traditional knowledge protection of ...
 
Development power point.
Development power point.Development power point.
Development power point.
 
Lease clinic space
Lease clinic spaceLease clinic space
Lease clinic space
 
Bhagawadgita by artaya honest2
Bhagawadgita by artaya honest2Bhagawadgita by artaya honest2
Bhagawadgita by artaya honest2
 
Honda deller(update07 03-56)
Honda deller(update07 03-56)Honda deller(update07 03-56)
Honda deller(update07 03-56)
 
ISDR Presentation - CRIT 2012
ISDR Presentation - CRIT 2012ISDR Presentation - CRIT 2012
ISDR Presentation - CRIT 2012
 
Ringkasan mahabrata by artaya honest
Ringkasan mahabrata by artaya honestRingkasan mahabrata by artaya honest
Ringkasan mahabrata by artaya honest
 
Tugas 4 pemorgraman orintasi objek membuat array dua dimensi program java-art...
Tugas 4 pemorgraman orintasi objek membuat array dua dimensi program java-art...Tugas 4 pemorgraman orintasi objek membuat array dua dimensi program java-art...
Tugas 4 pemorgraman orintasi objek membuat array dua dimensi program java-art...
 

Dernier

Dernier (11)

Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)
Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)
Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)
 
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
 
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
 
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
 
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
 
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
LoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイスLoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイス
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
 
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
 
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
 
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアルLoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
 
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
 
新人研修 後半 2024/04/26の勉強会で発表されたものです。
新人研修 後半        2024/04/26の勉強会で発表されたものです。新人研修 後半        2024/04/26の勉強会で発表されたものです。
新人研修 後半 2024/04/26の勉強会で発表されたものです。
 

Symfony勉強会 #9 sopraを支えるテストコード