Unit Testing PHP

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Unit Testing PHP - Presentation Transcript

    1. Unit Testing PHP
    2. Unit Testing
      • Making sure that stuff works
      • Boring :-(
      • What is Unit Testing?
      • Writing code to make sure that your code works
      • Part of the development phase, not the testing phase
      • Fun :-D
        • What is testing?
    3. Examples
      • The Simplest Test Ever Written
      • Something a bit more exciting
      • http://demo.pointbeing.net/unittesting/
    4. Test-Driven Development
      • Write the test first, then write the code to pass the test
      • Mantra: Red, Green, Refactor
      • Code is guaranteed to have full test coverage
    5. Bug Fixing Strategy
      • Write the smallest possible test that exposes the bug – formalise the bug as a failing test (red)‏
      • Do whatever it takes to make the test pass (green)‏
      • Tidy up and remove duplication (refactor)
      • The bug is fixed, and can never reappear...so long as you run the tests!
    6. Benefits
      • You can be confident that your code does what it's supposed to
      • Code is cleaner, classes and methods are simpler – code suddenly has “units”
      • Formal refactoring becomes a possibility
      • Time spent debugging is decimated; bugs do not magically reappear
      • You CV is stronger, and you earn more
    7.  

    + Simon HSimon H, 2 years ago

    custom

    464 views, 0 favs, 3 embeds more stats

    Some slides from a presentation at work. Blog post: more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 464
      • 432 on SlideShare
      • 32 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 4
    Most viewed embeds
    • 24 views on http://pointbeing.net
    • 7 views on http://www.pointbeing.net
    • 1 views on http://www-dev.pointbeing.net

    more

    All embeds
    • 24 views on http://pointbeing.net
    • 7 views on http://www.pointbeing.net
    • 1 views on http://www-dev.pointbeing.net

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories