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: Strateg...
Search
JLP Community
December 05, 2015
Programming
0
47
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
56
JLPDevs - Optimization Tooling for Modern Web App Development
jlpcommunity
3
210
Other Decks in Programming
See All in Programming
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.4k
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
200
Patterns of Patterns
denyspoltorak
0
1.4k
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
Fluid Templating in TYPO3 14
s2b
0
130
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
610
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
Oxlintはいいぞ
yug1224
5
1.4k
2026年 エンジニアリング自己学習法
yumechi
0
140
CSC307 Lecture 06
javiergs
PRO
0
690
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
2.6k
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
220
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.3k
Building the Perfect Custom Keyboard
takai
2
690
YesSQL, Process and Tooling at Scale
rocio
174
15k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
86
It's Worth the Effort
3n
188
29k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
170
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
320
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
350
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
Technical Leadership for Architectural Decision Making
baasie
2
250
Embracing the Ebb and Flow
colly
88
5k
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 :)