extensions (version 0.8.8, 30 April 2002)
index
c:\work\puffin\extensions.py

The Puffin Framework is extensible in many ways. Each of the following
components can be customized:
    -- input value generator - Generates a value for a given input for a test action.
    -- input value list generator - Generate a list of values for a given input. Each time
            the input is processed, the next value in the list is returned.
    -- output extractor - Extracts a value for a given output for a test action. This can 
            be from the HTTP response, or from processing some previously processed value
            from the token dictionary or simply the result from a custom python script.
    -- response analyzer - Upon receipt of an HTTP response from the execution of a test
            action, you can analyze those results to determine whether or not the test
            action was successful or not. For example, you could filter the response for
            a specific value or see if the server returned a specified HTTP code.
 
-------------------------------------------------------
Custom Input Value Generator Functions:
Custom Input Value Generator functions must match the following method signature:
    
    def functionName(tokenDictionary, paramDictionary):
        # Generate a value.
        return customValue
 
Note that all input value generator functions must accept a tokenDictionary and a 
paramDictionary, though you need not use either argument value.
-------------------------------------------------------
Custom Input Value List Generator Functions:
Custom Input Value List Generator Functions must match the same method signature:
 
    def functionName(tokenDictionary, paramDictionary):
        # Generate a value.
        return customValueList
 
Note that all input value list generator functions must accept a tokenDictionary and a 
paramDictionary, though you need not use either argument value. Also, an input value list
generator function must return a list of values.
-------------------------------------------------------
Custom Output Value Extractor Functions:
Custom output value extractor functions must match the following method signature:
 
    def extractorName(actionResponse, tokenDictionary, paramDictionary):
        # Extract a single value from the response (or create one).
        return extractedValue
 
Note that all output extractor functions must accept an actionResponse, a tokenDictionary and 
a paramDictionary. However, like in the input generator functions, you need not use any of
these. The value you "extract" could be completely custom created.
-------------------------------------------------------
Custom Response Analyzers:
All custom response analyzers are classes that extend the responseanalyzer.ResponseAnalyzer
class. See that class for more details.

 
Modules
            
mx.DateTime.mxDateTime.mxDateTime
puffinlogging
 
Classes
            
LoginCounter
 
class LoginCounter
      # COUNTERS -- Note use of singleton pattern in these counters.
 
   Methods defined here:
__init__(self)
getCurrentCounter(self)
incrementCounter(self)

Data and non-method functions defined here:
_LoginCounter__LoginCounter = <class extensions.__LoginCounter at 0x00AEBC98>
__doc__ = None
__module__ = 'extensions'
instance = None
 
Functions
            
Date = DateTime(...)
DateTime(year,month=1,day=1,hour=0,minute=0,second=0.0)
 
Returns a DateTime-object reflecting the given date
and time. Seconds can be given as float to indicate
fractions.
DateTime(...)
DateTime(year,month=1,day=1,hour=0,minute=0,second=0.0)
 
Returns a DateTime-object reflecting the given date
and time. Seconds can be given as float to indicate
fractions.
DateTimeDelta(...)
DateTimeDelta(days[,hours=0.0,minutes=0.0,seconds=0.0])
 
Returns a DateTimeDelta-object reflecting the given
day and time delta.
DateTimeDeltaFromDays(...)
DateTimeDeltaFromDays(days)
 
Returns a DateTimeDelta-object reflecting the given time
value given in days (fractions are allowed).
DateTimeDeltaFromSeconds(...)
DateTimeDeltaFromSeconds(seconds)
 
Returns a DateTimeDelta-object reflecting the given time
value.
DateTimeFromAbsDateTime(...)
DateTimeFromAbsDateTime(absdate[,abstime=0.0])
 
Returns a DateTime-object for the given absolute values.
DateTimeFromAbsDays(...)
DateTimeFromAbsDays(absdays)
 
Returns a DateTime-object reflecting the given time
value (days since the epoch).
DateTimeFromCOMDate(...)
DateTimeFromCOMDate(comdate)
 
Returns a DateTime-object reflecting the given date
and time.
GregorianDate = DateTime(...)
DateTime(year,month=1,day=1,hour=0,minute=0,second=0.0)
 
Returns a DateTime-object reflecting the given date
and time. Seconds can be given as float to indicate
fractions.
GregorianDateTime = DateTime(...)
DateTime(year,month=1,day=1,hour=0,minute=0,second=0.0)
 
Returns a DateTime-object reflecting the given date
and time. Seconds can be given as float to indicate
fractions.
JulianDate = JulianDateTime(...)
JulianDateTime(year,month=1,day=1,hour=0,minute=0,second=0.0)
 
Returns a DateTime-object reflecting the given Julian date
and time. Seconds can be given as float to indicate
fractions.
JulianDateTime(...)
JulianDateTime(year,month=1,day=1,hour=0,minute=0,second=0.0)
 
Returns a DateTime-object reflecting the given Julian date
and time. Seconds can be given as float to indicate
fractions.
Timestamp = DateTime(...)
DateTime(year,month=1,day=1,hour=0,minute=0,second=0.0)
 
Returns a DateTime-object reflecting the given date
and time. Seconds can be given as float to indicate
fractions.
cmp(...)
cmp(value1,value2[,accuracy=0.0])
 
Compares two DateTime[Delta] objects. If accuracy is
given, then equality will result in case the absolute
difference between the two values is less than or equal
to accuracy.
extractHotelDateComplete(actionResponse, tokenDictionary, paramDictionary)
Generate a date object for use in later test actions. Use the hotel date parts from earlier extractions.
extractStatusToken(actionResponse, tokenDictionary, paramDictionary)
Extract the status code from the xml document response.
generateBarValueList()
Sample token list generator. Generate a list of user names.
generateDate(tokenDictionary, paramDictionary)
Generate a random date based on a base date plus an number of weeks to offset.
generatePipedDate(tokenDictionary, paramDictionary)
Generate a date in piped delimited format: yyyy|mm|dd.
generateRandomAddress1(tokenDictionary, paramDictionary)
Generate a random street address using the current time.
generateRandomCity(tokenDictionary, paramDictionary)
Generate a random city name.
generateRandomCountry(tokenDictionary, paramDictionary)
Generate a random country name.
generateRandomFirstName(tokenDictionary, paramDictionary)
Generate a random first name using the current time.
generateRandomLastName(tokenDictionary, paramDictionary)
Generate a random last name using the current time.
generateRandomState(tokenDictionary, paramDictionary)
Generate a random state name.
generateRandomZipcode(tokenDictionary, paramDictionary)
Generate a random zipcode using the current time.
getNextLoginInfo(actionResponse, tokenDictionary, paramDictionary)
Extract USER, PASSWORD, or ITEMS_REMAINING.
gmt = utc(...)
utc()
 
Returns a DateTime-object reflecting the current UTC time.
now(...)
now()
 
Returns a DateTime-object reflecting the current local time.
setnowapi(...)
setnowapi(fct)
 
Sets the current time API used by now(). This must be
a callable function which returns the current local time in
Unix ticks.
time(...)
time() -> floating point number
 
Return the current time in seconds since the Epoch.
Fractions of a second may be present if the system clock provides them.
utc(...)
utc()
 
Returns a DateTime-object reflecting the current UTC time.
 
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 b08ad0>
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 adbeb0>
MaxDateTimeDelta = <DateTimeDelta object for '2147483647:00:00:00.00' at a3a7d8>
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 adbe30>
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__ = '.\\extensions.pyc'
__name__ = 'extensions'
__status__ = 'beta'
__version__ = '0.8.8'
current_myriad = 245
mxDateTimeAPI = <PyCObject object at 0x00B09210>
oneDay = <DateTimeDelta object for '1:00:00:00.00' at b08c78>
oneHour = <DateTimeDelta object for '01:00:00.00' at a1f820>
oneMinute = <DateTimeDelta object for '00:01:00.00' at a1fe98>
oneSecond = <DateTimeDelta object for '00:00:01.00' at 9798e8>
oneWeek = <DateTimeDelta object for '7:00:00:00.00' at 9b9ff8>
 
Author
             Keyton Weissinger <keyton@weissinger.org>