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
45
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
54
JLPDevs - Optimization Tooling for Modern Web App Development
jlpcommunity
3
210
Other Decks in Programming
See All in Programming
iOSでQRコード生成奮闘記
ktcryomm
2
140
Kotlinの開発でも AIをいい感じに使いたい / Making the Most of AI in Kotlin Development
kohii00
5
2k
複数のAWSアカウントから横断で 利用する Lambda Authorizer の作り方
tc3jp
0
130
バッチを作らなきゃとなったときに考えること
irof
2
560
Djangoにおける複数ユーザー種別認証の設計アプローチ@DjangoCongress JP 2025
delhi09
PRO
4
510
もう少しテストを書きたいんじゃ〜 #phpstudy
o0h
PRO
21
4.4k
Drawing Heighway’s Dragon- Recursive Function Rewrite- From Imperative Style in Pascal 64 To Functional Style in Scala 3
philipschwarz
PRO
0
170
Go 1.24でジェネリックになった型エイリアスの紹介
syumai
2
310
クックパッド検索システム統合/Cookpad Search System Consolidation
giga811
0
180
⚪⚪の⚪⚪をSwiftUIで再現す る
u503
0
130
データベースのオペレーターであるCloudNativePGがStatefulSetを使わない理由に迫る
nnaka2992
0
250
JAWS Days 2025のインフラ
komakichi
1
360
Featured
See All Featured
A Tale of Four Properties
chriscoyier
158
23k
The Language of Interfaces
destraynor
156
24k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1.1k
The World Runs on Bad Software
bkeepers
PRO
67
11k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.5k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
11
550
Music & Morning Musume
bryan
46
6.4k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Designing for humans not robots
tammielis
250
25k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.3k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
How STYLIGHT went responsive
nonsquared
99
5.4k
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 :)