Try this http://debuggable.com/posts/testing-models-in-cakephp---now-let's-get-rid-of-the-unnecessary-modeltest-classes-!:4890ed55-be28-4d4a-ba4c-7fd64834cda3
I posted some code Oct 14 (scroll down in the comments) that might help you. Testing does work (and works very well) but is particularly sensitive to naming / positioning of files etc - and the contents of those files, especially $fixtures. Your fixtures and cases need to be in the right place with the right content (obviously!) You probably want to review your $fixtures list to ensure all appropriate test data (related models) are loaded so you can test successfully to the fullest extent. You might also find that bugs in your test code / actual code can cause the default app layout screen to pop up telling you as much. If you have dependencies in your default layout (eg models loaded by app_controller) these can pop up and complain when in fact they are a bit of a red herring masking what the real problem is. I used to get this sporadic behaviour described below but it is almost certainly your configuration. Another hint - forget controllers testing completely until you can get Model testing working perfectly It is very cool when you see all your models testing to 100% coverage with xDebug. H On 11/14/08 14:06, validkeys wrote: > Hey Matt, thanks for the reply. I had tried deleting the tables in the > test db before running the test again and still had the same problem. > Hm...Any other thoughts? > > On Nov 14, 1:12 am, MattC <[EMAIL PROTECTED]> wrote: > >> I get this all the time. Make sure there are no tables in your test >> DB before you start the tests. >> >> -Mattwww.pseudocoder.com >> >> On Nov 13, 3:44 pm, validkeys <[EMAIL PROTECTED]> wrote: >> >> >>> I continue to have issues with Simple Test. I am using the latest >>> Trunk SVN of cake. I started my app a week ago with everything but the >>> bare necessities stripped away (most fields and most relationships). I >>> used the bake script to bake everything including the test cases and >>> fixtures. Since then I have added fields and added relationships to >>> each of my models. >>> >>> Now when ever I try to run a test through simple test, it keeps >>> telling me that it can't find various tables in the database. What is >>> even more weird is that it will tell me the "companies" table is >>> missing, but when I refresh, it will create the companies table in the >>> test_suite database and tell me that another table is missing. If I >>> refresh again, it goes back to telling me that the companies table is >>> missing. >>> >>> What could be causing this? >>> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---