Workflows testing

Author Message

Sébastien Morele

Monday 04 July 2011 1:54:49 am

Hi there,

is there a way to test worflows beeing out of context? The main idea is to launch a worflow after user registration, but testing with many user registration is so boring ....

Thanks !

Thiago Campos Viana

Monday 11 July 2011 12:27:03 pm

Maybe calling eZOperationHandler::execute and passing the right parametes, just do a quick search and check how this function is called in user/register or user/activate views, something like:

$publishResult = eZOperationHandler::execute( 'user' , 'register', array( 'user_id'=> $userID ) );

eZ Publish Certified Developer: http://auth.ez.no/certification/verify/376924

Twitter: http://twitter.com/tcv_br

Quoc Huy Nguyen Dinh

Monday 11 July 2011 3:18:41 pm

Or make in context testing less boring by developping a test suite with Selenium RC that click on the register link, fill the form with random data and email filled to you+testXX@gmail.com (where XX is dynamically generated numbers), php imap to check and click email validation link, loggin in cms and approve/deny registration, try to login as user for each scenario.

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 18 2025 00:05:41
Script start
Timing: Jan 18 2025 00:05:41
Module start 'layout'
Timing: Jan 18 2025 00:05:41
Module start 'content'
Timing: Jan 18 2025 00:05:41
Module end 'content'
Timing: Jan 18 2025 00:05:41
Script end

Main resources:

Total runtime0.5060 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 589.2266152.6094
Module start 'layout' 0.00570.0026 741.835939.4375
Module start 'content' 0.00830.4963 781.2734583.1016
Module end 'content' 0.50460.0013 1,364.375012.1875
Script end 0.5060  1,376.5625 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.6590160.0002
Check MTime0.00130.2633160.0001
Mysql Total
Database connection0.00100.194510.0010
Mysqli_queries0.461891.2688590.0078
Looping result0.00060.1283570.0000
Template Total0.475093.920.2375
Template load0.00250.484820.0012
Template processing0.472693.389620.2363
Template load and register function0.00010.020510.0001
states
state_id_array0.00060.110510.0006
state_identifier_array0.00060.128420.0003
Override
Cache load0.00200.3940130.0002
Sytem overhead
Fetch class attribute can translate value0.00040.088730.0001
Fetch class attribute name0.00100.193350.0002
XML
Image XML parsing0.00110.213330.0004
class_abstraction
Instantiating content class attribute0.00000.002250.0000
General
dbfile0.00090.1836240.0000
String conversion0.00000.001340.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
3content/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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs