Deutsch
English

May I introduce you to our new Testing Framework?

The TYPO3 extension tx_oelib is now equipped with a framework to easily add dummy records to the database. This is needed to have real records in the database that can be used within unit tests.

Main features

This little testing framework let's you

  • create records (with real UIDs!)
  • remove records
  • create relations (record on m:n table)
  • remove relations
  • clean up all the dummy records

The framework is built as a single class that has to be instantiated for each extension you'd like to test. This way it's possible to avoid changing anything on foreign tables. The clean up then deletes all dummy records and dummy relations and also resets the autoincrement_index on the tables. After testing with this testing framework, all tables are in the same state as before testing!

Feedback

I'd really appreciate any feedback! If you're using unit tests within your extension, why not try this testing framework for your next test methods?

Where to get it

I've just comitted everything to the SVN repository a few days ago. If you'd like to test drive it, just grab the current version either from the T3xdev SVN at Sourceforge, or the nightly *.t3x export on the T3xdev project page at Sourceforge.net. Of course the next oelib release in the TER will also contain those changes - but it will take another few days or even weeks until the next oelib version will be released.

Future plans

Currently this test framework is almost feature complete: It covers the functionality that we wanted to have implemented. Which is mainly what we currently need while working on the Seminar Manager (tx_seminars). But we already had some ideas to add - and we're absolutely open for any input!

Here's the list of our ideas:

      • Add method to change existing record in the database. See feature request 1235.
      • Make it possible to create and modify records through TCE instead of direct DB access. This would allow us to also check the functionality of the TCA and the postProcessing hooks. See Feature Request 1292.

      Hinterlasse eine Nachricht

      CAPTCHA Bild zum Spamschutz