Unit testing tables

Re: Unit testing tables

by sam marshall -
Number of replies: 0
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
I don't think we have any problem with insert/update/get_record performance, though - only with creating, blatting data into, and then dropping a whole bunch of tables, which is a much heavier option to carry out each time around any test case [especially one which might happen not to even use the database].

I think these defined datasets would be a great solution and I don't care what any expert says smile (Arrogant? Moi?) I do think it's important to ensure that they are correct [i.e. generated from latest install.xml files] and cannot be changed by any test, though. But I want to be clear, this isn't really about speed although things being painfully slow *is* a problem. It's mostly about it being as easy as possible - or let's be honest, as not-too-difficult as possible - to write unit tests. IMO that's the critical factor here. Having to create tables at the start of each test doesn't make it easier to write unit tests.

--sam