Wonder tests and databases
Ray Kiddy <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.wonder-disc |
|---|---|
| Message-ID | <[email protected]> |
Hello - I am starting to poke at some of the tests, following up on some discussions we had at WOWODC. There _was_ a lot of discussion about testing, and some of it, amazingly, was not from me. I set up, quite a while back, a way to run the default Wonder tests against both the Memory adaptor and MySQL. The tests run against the Memory adaptor by default. For using MySQL, I add the following to my wobuild.properties: wo.test.dbAccess.adaptor=MySQL wo.test.dbAccess.MySQL.URL=jdbc:mysql://localhost/wonderTest wo.test.dbAccess.MySQL.name=ray wo.test.dbAccess.MySQL.password=<password> One can then just do: "ant tests.run" and … there are a lot of errors. Most of them seem to be about the fact that the tearDown methods in the tests have calls like "c1.delete()", where c1 is an instance of a Company EO, and the object is not actually deleted from the database. I am not sure why this is yet. This leads to odd test failures. For example, the tests of ERXEnterpriseObjectCache fail, because they assume some objects have unique names, and if objects do not get deleted, the names are not unique and the caching does odd things. And so on. Anyway. If anyone wants to grab an entrenching tool and start digging, please feel free. Also, there are questions I might figure out later, or not. For example, I need to find the right Properties magic for the ERXTest project to turn on log4j output when running the application via ant, which will probably lead to adding some log.debug() calls where they would be helpful. May need a special Listener? Or maybe I just need to set the properties in the right place. And I am sure there are other things. Would it not be cool, though, if one could type "ant tests.run" and run the entire set of tests against the Memory adaptor, an H2 database, MySQL, Postgres and FrontBase, all at once? I could have all these databases on my laptop and probably some more that I have forgotten. It _would_ be cool! - ray ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/