Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is my take on it. I would say unit testing is the practice of writing software tests to verify that your real software does what it is meant to. This started with <a href="http://junit.org/" rel="noreferrer">jUnit</a> in the Java world and has become a best practice in PHP as well with <a href="http://simpletest.org/" rel="noreferrer">SimpleTest</a> and <a href="http://www.phpunit.de/" rel="noreferrer">phpUnit</a>. It's a core practice of Extreme Programming and helps you to be sure that your software still works as intended after editing. If you have sufficient test coverage, you can do major refactoring, bug fixing or add features rapidly with much less fear of introducing other problems.</p> <p>It's most effective when all unit tests can be run automatically.</p> <p>Unit testing is generally associated with OO development. The basic idea is to create a script which sets up the environment for your code and then exercises it; you write assertions, specify the intended output that you should receive and then execute your test script using a framework such as those mentioned above.</p> <p>The framework will run all the tests against your code and then report back success or failure of each test. phpUnit is run from the Linux command line by default, though there are HTTP interfaces available for it. SimpleTest is web-based by nature and is much easier to get up and running, IMO. In combination with xDebug, phpUnit can give you automated statistics for code coverage which some people find very useful.</p> <p>Some teams write hooks from their subversion repository so that unit tests are run automatically whenever you commit changes.</p> <p>It's good practice to keep your unit tests in the same repository as your application.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload