Puffin Automation Framework (PAF) query

Alan Kennedy alanmk at hotmail.com
Mon Nov 24 06:09:00 EST 2003


[Ben McGinnes]
> The major issue I've encountered at the moment is a conflict between the
> plan.xml and action.xml files.  From what I can tell the plan.xml file
> is supposed to specifically call the actions specified in action.xml in
> order to run them.  Yet at the moment if puffin detects objects of the
> same name in the two files, it breaks with a bunch of Traceback errors.
> 
> Ultimately they claim the XML was not well formed, but that XML has been
> independently verified as legitimate.  The only conflict we can narrow
> it down too is the similar names and, indeed, when I change the action
> names in plan.xml it appears to work (except that the actions specified
> in action.xml are not called, which they need to be).

What you're discovering is the puffin author's inappropriate use of
XML.

Although the documents you're using may be well-formed, the author has
imposed other implicit constraints on the contents of the XML files
used for configuration. And since these constraints are not
documented, you'll only find them in one of two ways:

1. Tripping over them, as you have just done.
2. Reading the source.

Apart from using a DOM to store the test results (Ugh!), the other
great XML sin committed in Puffin is that old canard: trying to use
XML as a programming language. For example, I just pulled this
fragment out of one of the sample test plans that comes with puffin:

<repeat name="repeat3" count="2">
   <task name="makePurchase" dependsList="makeDecision">
      <action name="generateSelectionCount"/>
      <action name="addItemToCart"/>
      <action name="updateCurrentSelection"/>
      <action name="showCart"/>
      <action name="getUpdatedInventory"/>
   </task>
</repeat>

XML as a programming language is a dead-end!

[Alan Kennedy]
>> Check this archive message for details
>>
>> http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=3F93BBA8.CCFBAFA1%40hotmail.com

[Ben McGinnes]
> Amusingly this thread was initiated by one of the other members of the
> project, prior to my joining it.  Still, the URLs suggested by yourself
> and others in the group will be reviewed once more.

I think it would be useful for you to re-read the last message in that
thread, from John J. Lee. Points of note include

1. Webunit may be a better choice than Puffin (I can't say: I haven't
used it).

2. If your requirements are as simple as indicated, then you may find
it far more productive to roll your own using the python standard
library. This should only take a few hours for someone familiar with
the standard library (as your esteemed colleague certainly is :-).
Alternatively, try a Google Groups search of c.l.py for "automate
httplib" or "automate form".

If time is of the essence, and nobody on the project has the
time/experience for the task, I am available for contract work at
reasonable rates ;-)

regards,

-- 
alan kennedy
-----------------------------------------------------
check http headers here: http://xhaus.com/headers
email alan:              http://xhaus.com/mailto/alan




More information about the Python-list mailing list