[coldbox-3.5.2] Dev Branch - Getting Tests to Succeed

I was recently playing around on the dev branch, and was trying to add some tests–specifically in orm/hibernate. With no modifications, I immediately ran into several errors when running the tests. Some were “APPKEY parameter to the init function is required…”, others were wirebox-related, etc. After playing around a bit, I made a few tweaks to get the errors in the tests to stop:

  • Added this.loadColdBox = false; to RestrictionsTest.cfc (this stopped the “APPKEY…” error)
  • Turned off eventhandling in Application.cfc - this prevented a lot of errors in test cases for things like testCreateCrieteria(), testCreateAlias(), etc
    My question is pretty general, I guess. Are there any special setups/considerations/tricks to circumventing these errors in the tests? I think I’ve got around the ones in the narrow area I’m exploring right now, but would be interested in hearing how others go about doing this.


Joel I am modifying some things for this to make it easier to test. Will commit soon.

By the way I ran to the same issue as you in terms of the diff counts than results when applying the distinc transformer

I resolved it by adding an extra argument to the count method so you can say either count() which translates to count(*) in SQL or count( id ) which is relevant when doing sun queries as well.

I just also read the subquery pull and man, great great job. I read the entire thing and it is absolutely great.

Would you mind doing a ColdBox connection on orm criteria? Nothing too formal. 20-30 minutes of just showcasing it.

Hi Luis–

Thanks for the kind words! I’d love to do a ColdBox connection–i’ll follow up with you on the specifics.

Re: the distinct count, I’ll have to check that out. Just noticed the addition you made on that. Thanks!