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
JLPDevs - Web Application Unit Testing: Strategy and Tools
Search
JLP Community
December 05, 2015
Programming
0
41
JLPDevs - Web Application Unit Testing: Strategy and Tools
JLP Community
December 05, 2015
Tweet
Share
More Decks by JLP Community
See All by JLP Community
JLP Community Profile
jlpcommunity
0
50
JLPDevs - Optimization Tooling for Modern Web App Development
jlpcommunity
3
200
Other Decks in Programming
See All in Programming
Rubyでたのしむクリエイティブコーディング/Enjoy Creative coding with Ruby
chobishiba
1
180
R言語の環境構築と基礎 Tokyo.R 112
bob3bob3
0
270
大規模UIKitベースアプリへのTCAの段階的導入/gradual-adoption-of-tca-in-a-large-scale-uikit-based-app
takehilo
1
180
PHPはいつから死んでいるかの調査
chiroruxx
1
400
AmperとFleetを使ったAndroidアプリ
yoppie
0
120
コーンフレークから始める モデリング会話入門
ogurotakayuki
0
380
TCAとKMPを用いた新規動画配信アプリ 「ABEMA Live」の設計
tomu28
1
110
雑に思考を整理する技術と効能
konifar
60
29k
デフォルトにして至高、RubyMineの大好きな所
ruzia
0
430
"config" ってなんだ? / What is "config"?
okashoi
0
240
スクラムガイドのスプリントレトロスペクティブを改めて読みかえしてみた / Re-reading the Sprint Retrospective Section in the Scrum Guide
mackey0225
3
440
スキーマ駆動開発による品質とスピードの両立 - 私達は何故、スキーマを書くのか
kentaroutakeda
0
170
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
274
13k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
30
6k
Atom: Resistance is Futile
akmur
259
25k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
20
1.9k
The Cult of Friendly URLs
andyhume
74
5.7k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
9
8.3k
Principles of Awesome APIs and How to Build Them.
keavy
121
16k
Agile that works and the tools we love
rasmusluckow
325
20k
Faster Mobile Websites
deanohume
299
30k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
79
43k
Docker and Python
trallard
34
2.7k
The Pragmatic Product Professional
lauravandoore
25
5.8k
Transcript
Web Application Unit Testing: Strategy and Tools Presented by: Salman
El Farisi 05 Desember 2015 @ code margonda
Let's Move On Runnable Code Testable Code
Not So Testable Code
Better Version
Better Version (2)
Testing Pyramid
Web Application Unit Testing Challenge: Too much dependency Network
(HTTP Request) Database Third Party Library File System (upload / download file) Tools: PHPUnit (Unit testing framework) Mockery (Mock Object) Faker (Fake Object) PHP-DI / Pimple (Dependency Injection Library)
Mockery
Faker
Web Application Unit Testing (2)
Web Application Unit Testing (3)
Web Application Unit Testing (3) Assertion: Compare expected and actual
value AssertTrue() AssertNotNull() AssertEquals() AssertArrayHasKey() AssertClassHasAttribute() Etc. https://phpunit.de/manual/current/en/phpunit-book.html#appendixes.assertions
Mock Object RoleController.php Connect to database
Mock Object (2) RoleControllerTest.php Control the 'Role' class behaviour so
it wont touch the database
Fake Object Create fake object
Thank You :)