Automated Testing with PHPUnit. How do you know your code works?. Manual Testing. Type in a value Submit the form Check by eye. Manual Testing. Tedious Time Consuming Error Prone Did you test everything? Consistently?. Automated Testing. Have the computer run your tests.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Automated Testing with PHPUnit
Have the computer run your tests
Know that your code does what it needs to
Know that your code doesn’t break anything that used to work
Automated testing one unit at a time
Module (procedural programming)
Code that makes executing tests simple
Often a command-line tool
(useable by IDE)
Test Driven Development (TDD)
How should your code work?
What do the requirements mean?
Do The Simplest Thing That Could Possibly Work
Know when you’re done: All tests are green.
Tests become biased for the code you already wrote