News

Articles | Development

Articles: ZkUnit 1.0 and DebugToolbar 1.0 released

Contributed by planetenkiller on Aug 16, 2009 - 06:54 AM

Development

ZkUnit allows developers to write Unit and UI tests, while DebugToolbar shows a small toolbar (like the Symfony one) on the upper right side of the web page.

ZkUnit

This module has been created during the development of TimeIt because I wanted to write automated tests. The module uses PHPUnit in the background and extends it by a own implementation of fixtures (description of the test data). Transactions are used to put back the changes made by the tests continuously again. With Selenium (UI tests) the tests can also be done via browser.

Tests can be performed via web interface, command line or Netbeans. Some people might noticed that it requires a little more special environment. ZkUnit requires PHP5 with a memory_limit of at least 100 MB (perhaps also more (300-500 MB)). MySQL users must use InnoDB insted of MyISAM as table engine (all tables in an installation must use InnoDB). InnoDB because it supports transactions.

The Wiki on the project site contains a documentation (I hope you understands what I have written.). If someone would like to see some real tests, have a look at the TimeIt (SVN).


Web interface that allows you to run tests

Web interface which displays the results of the tests (only for tests run by the web interface)

Project site: http://code.zikula.org/zkunit
Download: http://code.zikula.org/zkunit/downloads

DebugToolbar

This module shows a small toolbar on the upper right side of the web page (see the pictures further on top). This tool bar shows various things: Modulevars of the current module, used memory of PHP, page render time and executed SQL-Queries. I've primarily wrote this module because of the SQL-Queries. Zikula can display the Queries, but they will be displayed at the bottom of the website and are even hidden by some Themes. If you switch on the adodb-logging the whole website would be broken. DebugToolbar does not have all these problems.

Project site: http://code.zikula.org/zkunit (same as ZkUnit)
Download: http://code.zikula.org/zkunit/downloads

Footnote: Usually we do not release module news here, but this is too important as it adds unit test capablities to development. This is also planned for the core as a server side solution in the near future.
 

Share    

Comments

Comment by:
dits's Avatar
dits
20 Aug 2009 - 08:59AM
Really nice
Haven't 'tested' ZkUnit, but it sounds great! Looking forward to exploring this.
 
Only logged in users are allowed to comment. register/log in