| 1 | Simple Test |
| 2 | =========== |
| 3 | You probably got this package from... |
| 4 | http://sourceforge.net/projects/simpletest/ |
| 5 | |
| 6 | If there is no licence agreement with this package please download |
| 7 | a version from the location above. You must read and accept that |
| 8 | licence to use this software. The file is titled simply LICENSE. |
| 9 | |
| 10 | What is it? It's a framework for unit testing, web site testing and |
| 11 | mock objects for PHP 4.3+. |
| 12 | |
| 13 | If you have used JUnit you will find this PHP unit testing version very |
| 14 | similar. Also included is a mock objects and server stubs generator. |
| 15 | The stubs can have return values set for different arguments, can have |
| 16 | sequences set also by arguments and can return items by reference. |
| 17 | The mocks inherit all of this functionality and can also have |
| 18 | expectations set, again in sequences and for different arguments. |
| 19 | |
| 20 | A web tester similar in concept to JWebUnit is also included. There is no |
| 21 | JavaScript or tables support, but forms, authentication and cookies are |
| 22 | handled. Frames will be supported soon. |
| 23 | |
| 24 | You are not tied to just using SimpleTest, though. The mocks and stubs |
| 25 | will work with other test frameworks and SimpleTest can use other |
| 26 | framework's (PHPUnit, PEAR::PhpUnit) test cases as it's own. The |
| 27 | web browser part of the web tester can also be used independently either |
| 28 | in other testers or as part of a scripting solution. |
| 29 | |
| 30 | You can see a release schedule at |
| 31 | http://www.lastcraft.com/overview.php which is also copied to the |
| 32 | documentation folder with this release. The user interface is minimal |
| 33 | in the extreme, but a lot of information flows from the test suite. |
| 34 | After version 1.0 we will release a better web UI, but we are leaving XUL |
| 35 | and GTk versions to volunteers as everybody has their own opinion |
| 36 | on a good GUI, and we don't want to discourage development by shipping |
| 37 | one with the toolkit. |
| 38 | |
| 39 | If you are extending the toolkit or wish to bundle parts of the toolkit |
| 40 | with your own software, you can see a full PHPDoc API on sourceforge |
| 41 | as http://simpletest.sourceforge.net/. |
| 42 | |
| 43 | You are looking at a Beta release. |
| 44 | |
| 45 | The unit tester and mock object generator are tested and have already |
| 46 | been used to test several systems. The web tester portion still lacks |
| 47 | frames support, but is mostly stable. Documentaion is currently lacking, |
| 48 | but should be improved for a version 1.0 release. |
| 49 | |
| 50 | The unit tests for SimpleTest itself can be run here... |
| 51 | |
| 52 | simpletest/test/unit_tests.php |
| 53 | |
| 54 | And tests involving live network connections as well are here... |
| 55 | |
| 56 | simpletest/test/all_tests.php |
| 57 | |
| 58 | The full tests read some test data from the LastCraft site. If the site |
| 59 | is down or has been modified for a later version then you will get |
| 60 | spurious errors. A unit_tests.php failure on the other hand would be |
| 61 | very serious. As far as we know we haven't yet managed to check in any |
| 62 | test failures so please correct us if you find one. |
| 63 | |
| 64 | Even if all of the tests run please verify that your existing test suites |
| 65 | also function as expected. If they don't see the file... |
| 66 | |
| 67 | simpletest/HELP_MY_TESTS_DONT_WORK_ANYMORE |
| 68 | |
| 69 | This contains information on interface changes. It also points out |
| 70 | deprecated interfaces so you should read this even if all of |
| 71 | your current tests appear to run. |
| 72 | |
| 73 | You can find a tutorial on http://www.lastcraft.com/first_test_tutorial.php to |
| 74 | get you started and hopefully this material will eventually become included |
| 75 | with the project documentation. There is a documentation folder, but it is |
| 76 | just a subset of the material on Sourceforge. |
| 77 | |
| 78 | If you download and use and possibly even extend this tool, please let us |
| 79 | know. Any feedback, even bad, is always welcome and we will work to get |
| 80 | your suggestions into the version one release. Ideally please send your |
| 81 | comments to... |
| 82 | |
| 83 | simpletest-support@lists.sourceforge.net |
| 84 | |
| 85 | ...so that others can read them too. We usually try to respond within 48 |
| 86 | hours. |
| 87 | |
| 88 | There is no change log as yet except at sourceforge. You can visit the |
| 89 | release notes to see the completed TODO list after each cycle and also the |
| 90 | status of any bugs, but if the bug is recent then it will be fixed in CVS only. |
| 91 | The CVS check-ins always have all the tests passing and so CVS snapshots should |
| 92 | be pretty usable, although the code may not look so good internally. |
| 93 | |
| 94 | Oh, yes. It is called "Simple" because it should be simple to |
| 95 | use. We intend to add a complete set of tools for a test first |
| 96 | and "test as you code" type of development. "Simple" does not |
| 97 | mean "Lite" in this context. |
| 98 | |
| 99 | Thanks to everyone who has sent comments and offered suggestions, they |
| 100 | really are invaluable. |
| 101 | |
| 102 | Thanks to the advanced PHP forum on SitePoint. It is the place to be right |
| 103 | now. |
| 104 | |
| 105 | Authors are Marcus Baker, Jason Sweat and Harry Feucks. |
| 106 | |
| 107 | yours, Marcus Baker |
| 108 | -- |
| 109 | marcus@lastcraft.com |