TDD Pfcongrez09
TDD Pfcongrez09
About Testing
Web Application Testing
Testable Parts
Front-end
● Acceptance Tests and System Tests that run in the
browser
● Testing of Web Services with Unit Tests
● Performance Testing
● Security Testing
Back-end
● Functional Testing of business logic with Unit Tests
own tests
Testing Methods
Unit Testing
Tests small parts of an application or library (units) for
correctly working code. Tools: PHPUnit, SimpleTest
System Testing
The testing of a whole integrated system against the
specified requirements. Tools: Selenium
Non-functional Testing
Testing for performance, load, stress, reliability, availability,
security. Tools: ab, siege, httperf, chorizo
Test-Driven Development
a feature without a test is not a feature
Test-Driven Development
It is a religion.
✡✝☪
Back In Time
Traditional Development Phases
Requirements Specification
Define what the software is supposed to do.
Design
Define how the software is supposed to be implemented.
Implementation
The implementation of the software itself.
Testing
The implemented software is tested.
Sometimes.
Tests are King
Test Suites
● Contain tests that check whether the code does what it
is supposed to do
● Also cover things that should fail
Into the Future
Test-Driven Development Phases
Requirements Specification
Define what the software is supposed to do.
Design
Define how the software is supposed to be implemented.
Implementation ≡ Testing
The implemented software is tested.
The implementation of the software itself.
Test-Driven Development
eZ Components Development
descriptions
● Write test cases
● Initial implementation
● Implementation review
Pre-release Testing
Test-Driven Development
Addressing Defects
someday.
● An ugly test is better than no test.
http://www.artima.com/weblogs/viewpost.jsp?thread=203994
PHP Unit
PHPUnit
Unit Testing Framework for PHP
PHPUnit
Code Coverage: No Code Without Test
PHPUnit
Code Coverage: No Code Without Test
http://www.developertesting.com/archives/month200705/200
70504-000425.html
phpUnderControl
Continuous integration with CruiseControl
Un-testable Problems
?
Resources
● http://homepage.mac.com/hey.you/lessons.html
● Testuvius: http://www.artima.com/weblogs/viewpost.jsp?
thread=203994
● PHP: http://www.php.net