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
44
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
C++でシェーダを書く
fadis
6
4k
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
210
イベント駆動で成長して委員会
happymana
1
300
現場で役立つモデリング 超入門
masuda220
PRO
15
3.1k
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
1
310
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
推し活の ハイトラフィックに立ち向かう Railsとアーキテクチャ - Kaigi on Rails 2024
falcon8823
6
2.7k
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
210
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
1.7k
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
210
役立つログに取り組もう
irof
28
9.4k
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
RailsConf 2023
tenderlove
29
900
Visualization
eitanlees
145
15k
Designing for humans not robots
tammielis
249
25k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
GraphQLとの向き合い方2022年版
quramy
43
13k
Docker and Python
trallard
40
3.1k
Navigating Team Friction
lara
183
14k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Embracing the Ebb and Flow
colly
84
4.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 :)