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
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
510
Google Opalで使える37のライブラリ
mickey_kubo
2
120
PHPに関数型の魂を宿す〜PHP 8.5 で実現する堅牢なコードとは〜 #phpcon_hiroshima / phpcon-hiroshima-2025
shogogg
1
310
20251016_Rails News ~Rails 8.1の足音を聴く~
morimorihoge
2
620
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
340
Software Architecture
hschwentner
6
2.3k
AIと人間の共創開発!OSSで試行錯誤した開発スタイル
mae616
2
750
アメ車でサンノゼを走ってきたよ!
s_shimotori
0
230
One Enishi After Another
snoozer05
PRO
0
130
デミカツ切り抜きで面倒くさいことはPythonにやらせよう
aokswork3
0
250
タスクの特性や不確実性に応じた最適な作業スタイルの選択(ペアプロ・モブプロ・ソロプロ)と実践 / Optimal Work Style Selection: Pair, Mob, or Solo Programming.
honyanya
3
180
SODA - FACT BOOK(JP)
sodainc
1
8.5k
Featured
See All Featured
How GitHub (no longer) Works
holman
315
140k
How STYLIGHT went responsive
nonsquared
100
5.8k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.1k
The World Runs on Bad Software
bkeepers
PRO
72
11k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
Fireside Chat
paigeccino
40
3.7k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
KATA
mclloyd
PRO
32
15k
Code Review Best Practice
trishagee
72
19k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.5k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.2k
Building a Modern Day E-commerce SEO Strategy
aleyda
44
7.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 :)