| testaction (version 0.8.8, 30 April 2002) | index c:\work\puffin\testaction.py |
The test action is the fundamental unit of any puffin test plan. It represents a step in a
larger process. Most often, a test action represents a call to your web application. However,
sometimes, a test action can represent only a specific action in a test plan that, when
executed, produces an output value for later use.
Test actions (as are most things) are configured in the puffin config file.
Here is an example test action that involves a server call:
<testAction name='login' stopPlanOnFail='1'>
<path>/jsp/appLogin.jsp</path>
<responseAnalyzers useDefaults="1">
<responseAnalyzer src="puffin" type="ExpressionResponseAnalyzer">
<param name="expr"><![CDATA[E.C.PTION]]></param>
<param name="caseSensitive">0</param>
<param name="re">1</param>
<param name="foundResult">0</param>
</responseAnalyzer>
</responseAnalyzers>
<input name='userid' type='POST' processor='DICT' sendDefault='0' defaultValue=''>
<param name='key' eval='0'>USER</param>
</input>
<input name='password' type='POST' processor='DICT' sendDefault='0' defaultValue=''>
<param name='key' eval='0'>PASSWORD</param>
</input>
<output key='SECURITY_COOKIE' processor='extractHeader' extractDefault='0' defaultValue=''>
<param name='headerName' eval='0'>set-cookie</param>
<param name='headerPrefix' eval='0'>WebLogic</param>
</output>
</testAction>
As you can see, you have a path (which represents how to call the server app) and a series
of inputs and/or outputs. It also includes a section specifying the response analyzers to
use with this test action (note you can choose to ALSO use the defaults as well as the
response analyzers configured here, if you choose). The default on whether or not to use
the default response analyzers is TRUE. This results in the test action's response being
analyzed against the default response analyzers and the response analyzers configured
specifically to the test action.
Here is an example test action that does NOT involve a server call:
<testAction name='loginLoad' stopPlanOnFail='0' noSvrCall='1'>
<path/>
<output key='USER' processor='getNextLoginInfo' src='custom' extractDefault='0' defaultValue=''>
<param name='returnVal' eval='0'>USER</param>
</output>
<output key='PASSWORD' processor='getNextLoginInfo' src='custom' extractDefault='0' defaultValue=''>
<param name='returnVal' eval='0'>PASSWORD</param>
</output>
<output key='ITEMS_REMAINING' processor='getNextLoginInfo' src='custom' extractDefault='0' defaultValue=''>
<param name='returnVal' eval='0'>ITEMS_REMAINING</param>
</output>
</testAction>
Note that other than the noSvrCall attribute on the <testAction> element, there is no
difference between a test action that involves a server call and one that does not.
To execute a test action, you must specify it in a test plan. Test plans come in two forms.
For more detail, see the user's guide in /doc folder.
All test actions can have one or more input and/or output tokens. (For more information on
inputs and/or outputs, see the tokenprocessing module.) However, puffin need not process all
inputs or outputs. You can specify that only some subset of the total set of possible inputs
or outputs get processed in the test plan. See the user's guide for more information.
| Modules | ||||||
| ||||||
| Classes | ||||||||||||||||||
| ||||||||||||||||||
| Functions | ||
| ||
| Data | ||
| ARPA = <lazy module 'mx.DateTime.ARPA'> April = 4 August = 8 December = 12 Epoch = <DateTime object for '0001-01-01 00:00:00.00' at a77ef0> Feasts = <lazy module 'mx.DateTime.Feasts'> February = 2 Friday = 4 Gregorian = 'Gregorian' ISO = <lazy module 'mx.DateTime.ISO'> January = 1 Julian = 'Julian' July = 7 June = 6 Locale = <lazy module 'mx.DateTime.Locale'> March = 3 MaxDateTime = <DateTime object for '5867440-12-31 00:00:00.00' at ad0d58> MaxDateTimeDelta = <DateTimeDelta object for '2147483647:00:00:00.00' at 7e3d20> May = 5 MinDateTime = <DateTime object for '-5851455-01-01 00:00:00.00' at a79ef8> MinDateTimeDelta = <DateTimeDelta object for '-2147483647:00:00:00.00' at ad0cd8> Monday = 0 Month = {None: 0, 0: None, 1: 'January', 2: 'February', 3: 'March', 4: 'April', 5: 'May', 6: 'June', 7: 'July', 8: 'August', ...} NIST = <lazy module 'mx.DateTime.NIST'> November = 11 ODMG = <lazy module 'mx.DateTime.ODMG'> October = 10 POSIX = 1 Parser = <lazy module 'mx.DateTime.Parser'> Saturday = 5 September = 9 Sunday = 6 Thursday = 3 Tuesday = 1 Wednesday = 2 Weekday = {0: 'Monday', 1: 'Tuesday', 2: 'Wednesday', 3: 'Thursday', 4: 'Friday', 5: 'Saturday', 6: 'Sunday', 'Friday': 4, 'Monday': 0, 'Saturday': 5, ...} __author__ = 'Keyton Weissinger __date__ = '30 April 2002' __file__ = '.\\testaction.pyc' __name__ = 'testaction' __status__ = 'beta' __version__ = '0.8.8' current_myriad = 245 mxDateTimeAPI = <PyCObject object at 0x00B1B598> oneDay = <DateTimeDelta object for '1:00:00:00.00' at acc948> oneHour = <DateTimeDelta object for '01:00:00.00' at 774928> oneMinute = <DateTimeDelta object for '00:01:00.00' at ac0140> oneSecond = <DateTimeDelta object for '00:00:01.00' at ac03b8> oneWeek = <DateTimeDelta object for '7:00:00:00.00' at ad5ea0> | ||
| Author | ||
| Keyton Weissinger <keyton@weissinger.org> | ||