Testing eZ code

Author Message

Paul Forsyth

Friday 23 January 2004 3:09:04 am

Im considering how best to test code that I develop. I usually work soley with extensions, build a few libraries in to help me out, with little need of kernel changes except in specific cases.

Has anyone developed unit/integration/regression tests with systems like eZ in PHP before?

I've used apis like JUnit and I find its methodology very potent. One of its variations, PHPUnit, but it only appears to handle PHP scripts and not the client/server interaction needed to test eZ.

I notice PHPUnit now requires PHP 5, doh!

http://pear.php.net/package-info.php?package=PHPUnit

The use of JWebUnit/HttpUnit may be a type of answer as it appears to handle client/server interaction, but for the fact it requires Java unit tests.

http://jwebunit.sourceforge.net/
http://httpunit.sourceforge.net/

What are peoples experience of such testing?

Ideally I'd like to release unit tests for all code I write, both internally and publically on pubsvn.

paul

Paul Forsyth

Friday 30 January 2004 6:09:48 am

Lovely :)

http://pubsvn.ez.no/viewcvs/ezp/trunk/tests/

paul

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 01:03:05
Script start
Timing: Jan 19 2025 01:03:05
Module start 'layout'
Timing: Jan 19 2025 01:03:05
Module start 'content'
Timing: Jan 19 2025 01:03:05
Module end 'content'
Timing: Jan 19 2025 01:03:05
Script end

Main resources:

Total runtime0.5618 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0069 590.7891153.4375
Module start 'layout' 0.00690.0031 744.226639.3594
Module start 'content' 0.01000.5505 783.5859424.7969
Module end 'content' 0.56050.0013 1,208.38288.1953
Script end 0.5617  1,216.5781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.5613160.0002
Check MTime0.00130.2397160.0001
Mysql Total
Database connection0.00120.209910.0012
Mysqli_queries0.516291.8805520.0099
Looping result0.00050.0844500.0000
Template Total0.529494.220.2647
Template load0.00190.340720.0010
Template processing0.527493.884220.2637
Template load and register function0.00030.046510.0003
states
state_id_array0.00090.166610.0009
state_identifier_array0.00080.150720.0004
Override
Cache load0.00160.2795180.0001
Sytem overhead
Fetch class attribute can translate value0.00060.108110.0006
Fetch class attribute name0.00200.357020.0010
XML
Image XML parsing0.00020.036310.0002
class_abstraction
Instantiating content class attribute0.00000.001620.0000
General
dbfile0.00170.3026100.0002
String conversion0.00000.005240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs