We now have the Puffin framework configured to the demo environment (or your own if you have been altering these statements for your own Web application). Now it's time to configure the possible test actions that we will use in our test plans. But first, let's review what a test action is. A test action is the smallest executable element in a test plan. It may or may not involve a call to your Web application (they usually do). They can represent calls to the database or simply a step in a test plan in which you process some data at a key point in the test plan's execution. We will see examples of non-server call test actions in the next article. In this article, we will stick to those test actions that involve a call to your Web application.
Let's take a brief detour and discuss the demo application that comes with Puffin. The Puffin Palace is a relatively simple Perl CGI application in which you "log in," select a type of item from a list of categories, then select some number of items for your shopping cart, and finally check out and see the total cost. Though simple, we can use it to drive Puffin through its paces.
We'll start by creating a test action that represents the application's login. This is a simple, non-secure "login" in name only. Basically, a user would click a link, and the app would generate a session identifier and then incorporate it into all links on the first page (the list of product categories). Here is the Puffin config file entry for the login message:
So this test action represents a user's clicking on some link that calls the start.cgi page in the Puffin demo application:
When this page of the demo application is called, the following HTML is returned:
The demo application randomly generates the
session_id parameter on the
query string for the
itemList.cgi call. This session id is then sent in all
subsequent calls to identify the user. In the background, the demo app is
creating a unique cart file, etc. The details are not relevant other
than the fact that they are meant to mimic the actual login process for
some Web applications. We need to get that session id, so that Puffin can
send it if any other test actions are called after this one in a test