Developer Forums | About Us | Site Map
Search  
HOME > TUTORIALS > SERVER SIDE CODING > PYTHON TUTORIALS > WEB APPLICATION TESTING WITH PUFFIN: PART 1


Sponsors





Useful Lists

Web Host
site hosted by netplex

Online Manuals

Web application testing with Puffin: Part 1
By Keyton Weissinger - 2004-05-26 Page:  1 2 3 4 5 6 7 8 9

Now for a test plan

So far we have built a Puffin configuration file. Puffin will use this file to know "how" to communicate with your Web application. However, it does not know "what" communication you want it to execute. For this, you need a test plan file. For now, rename the test.plan file that comes with Puffin to test.planORIG or similar, delete the old test.plan file, and create a new empty file of that name.

Puffin allows for two different test plan formats: a simple format that allows you to make quick and dirty test plans that you don't expect to grow in complexity and you may not even keep -- and a complex, XML-based format that allows for the following:

  • Including plans in other plans
  • Iterating over plans until some condition occurs
  • Grouping multiple test actions into a task that gets executed as a whole
  • Dependencies between tasks (if one fails, then a dependent task is not executed)
  • And more

That's too much to tackle here. We will attack those in the next article. We will focus here on simple test plans, so in your new test.plan file, enter the following (with no preceding spaces), and save it in the same folder as puffin.py:


   # This is a sample test plan.
   login
   getPetsList
   getPostersList
   tooLong
   serverError

As you might guess, Puffin will ignore any line starting with a # character or a whitespace as not containing the name of a test action. It will "assume" every other line contains the name of a test action and will attempt to retrieve the test action's configuration information from the current Puffin config file.

You can create as many test plans as you like with the test actions in whatever order. There is no need to keep them called test.plan other than convenience (other names or placement in other folders requires using the --test.plan=... command-line argument when you run Puffin).

This is one of the fundamental strengths of Puffin. You configure a given test action in one place. Then you can use it in as many test plans as you like.



View Web application testing with Puffin: Part 1 Discussion

Page:  1 2 3 4 5 6 7 8 9 Next Page: Running a test plan

First published by IBM developerWorks


Copyright 2004-2024 GrindingGears.com. All rights reserved.
Article copyright and all rights retained by the author.