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
49
0
Share
JLPDevs - Web Application Unit Testing: Strategy and Tools
JLP Community
December 05, 2015
More Decks by JLP Community
See All by JLP Community
JLP Community Profile
jlpcommunity
0
58
JLPDevs - Optimization Tooling for Modern Web App Development
jlpcommunity
3
210
Other Decks in Programming
See All in Programming
Going Multiplatform with Your Android App (Android Makers 2026)
zsmb
2
390
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
4
870
アクセシビリティ試験の"その後"を仕組み化する
yuuumiravy
0
120
Nuxt Server Components
wattanx
0
270
[PHPerKaigi 2026]PHPerKaigi2025の企画CodeGolfが最高すぎて社内で内製して半年運営して得た内製と運営の知見
ikezoemakoto
0
340
YJITとZJITにはイカなる違いがあるのか?
nakiym
0
200
10 Tips of AWS ~Gen AI on AWS~
licux
5
330
CDK Deployのための ”反響定位”
watany
4
710
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
300
Running Swift without an OS
kishikawakatsumi
0
780
「速くなった気がする」をデータで疑う
senleaf24
0
170
Redox OS でのネームスペース管理と chroot の実現
isanethen
0
570
Featured
See All Featured
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
190
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.2k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
200
Test your architecture with Archunit
thirion
1
2.2k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.8k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
670
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
98
エンジニアに許された特別な時間の終わり
watany
106
240k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
170
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 :)