Testing a cake – what’s missing?

In the last few days I discussed with several people about (unit) testing in CakePHP. The result is that testing with CakePHP is not as easy as it should be (not really a surprise if you ever tried to write tests *g*), and that some features are missing. So here my current todo list for the test suite:

  • Restructure tests folder
  • Command line support
  • Fixtures for model tests
  • Make it easier to test controllers (it is a bit spongy, I know)

Other ideas? Wishes? Please let me know :)

5 Comments

  1. Posted August 17, 2006 at 10:49 am | Permalink

    it would be nice to integrate javascript testing with the test suite. i’ve done this by just passing the javascript test file to the jsunit testing app. also having a test suite which is a little bit more mvc. it’s hard to brand the test suite :)

    as i already mentioned at felix’ blog and in the google group i would like to help refactoring the test suite.

  2. Posted August 17, 2006 at 6:17 pm | Permalink

    @teemow: Yes, integrated javascript testing would be nice. You can join the testsuite project on cakeforge: http://cakeforge.org/projects/testsuite/

  3. Posted August 18, 2006 at 2:44 am | Permalink

    +1 for javascript testing

    what id like to see is automated fixtures for “junking” a database .. like if you have a db w/ (id int, title varchar(100), post text, entered timestamp), id like to have a command line to through N random records at it to fill up the database easily and quickly.

    id like to think a script of some kind already exists for this, anyone know?

    thanks!

  4. Posted August 19, 2006 at 9:38 am | Permalink

    Having fixtures is quite important. The way they are realized in rails is just the way to go

  5. Posted August 19, 2006 at 1:41 pm | Permalink

    @jon baer: Good idea.

    There exist some commercial products, search for “test data generator”.


%d bloggers like this: