If you are using CakePHP 1.2 you probably noticed the folders /app/tests and /cake/tests. They are part of the official CakePHP test suite which comes with Cake.
Before you can use it, you have to download SimpleTest, the testing framework used by the test suite. Extract the package to your vendors folder and you are ready to execute tests. (If you have an advanced setup you also have to change the value of CAKE_CORE_INCLUDE_PATH in app/webroot/test.php)
To execute tests you have to go to example.com/test.php and you will see the following page:

There you can select whether you want to execute the core tests or your own application-specific tests. These application-specific tests must be placed in the respective folders in app/tests/cases resp. in app/tests/groups if they are group tests. The file names of the tests must end with “.test.php” (e.g. “user.test.php” for the user model test) respectively “.group.php” (e.g. “helpers.group.php” for a group test of all helpers). It’s imho a bit illogical, as everywhere else in the framework an underscore is used to separate the name parts. As usual in Cake, the class names are camel-cased, so the class names will be “UserTest” and “HelpersGroup”. Apart from those conventions the tests are “normal” SimpleTest tests, there is no magic (yet). You can find many real-world examples of such tests in /cake/tests.
Personally, I still prefer my own test suite, even though it requires a bit more configuration work.
Happy testing :)
Update (2007-04-07): In the meantime fixtures have been introduced. The usage of them is described in “Testing Models with CakePHP 1.2 test suite”.

then enhance it ;)
I prefer your test suite too, Daniel.
@othman: Well, I proposed my test suite as enhancement resp. replacement of the official test suite last year, but without luck. As I am a lazy guy it doesn’t make sense for me to do the same work twice…
[...] cakebaker » How to use the official CakePHP test suite (tags: cakephp simpletest) [...]
[...] How to use the official CakePHP test suite [...]
[...] Cómo usar la suite de prueba oficial de CakePHP – Visitar [...]
For me the question is, do the benefits of Daniel’s test suite compensate for using something that’s AFAICT not exactly open source? (The source, of course, is freely readable but I’m inferring there’s not a community based development effort.)
For now I’ll try the CakePHP standard suite and see if I get fed up with some missing feature or other….
@Philip: That’s a good question. There is no community around it, and I don’t think there are many users.
Good luck with the official test suite :)
It’s probably worth noting that you must have DEBUG >= 1 , or you’re going to get an intentionally cryptic “Invalid url.” message from test.php.
@Philip: Thanks for this hint, I wasn’t aware of it.
[...] О тестах в CakePHP + инструкция по тестированию [...]
[...] bakery.cakephp.org – Testing Models with CakePHP 1.2 test suite cakebaker.42dh.com – How to use the official CakePHP test suite [...]
[...] (RSS) Feed them Cake [...]
[...] Cómo usar la suite de prueba oficial de CakePHP – Visitar [...]
You did a really good job to how to use cakephp
@tech news: You are welcome!