Escolar Documentos
Profissional Documentos
Cultura Documentos
PM Group -
Design Tools
Contents
1 Introduction .................................................................................................................... 3
4 Conclusion ................................................................................................................... 10
C:\Jon\eCATT\Documents\TDC_Example_Paper.doc Page 2
eCATT: Test Configurations and Test Data Containers
1 Introduction
One of the main features of eCATT (and CATT before it) is the relative ease with which you can compile
complex data-driven tests, running a test script several times with different sets of data. There are essentially
two reasons why you might want to do this:
To test borderline values: When you test how a transaction behaves, you will typically have
some control data. Normally, you will always have one set of data that will always cause the
application to run successfully, and you may well have a second set of data that should always
cause the application to fail. In between these black and white values, you have a large gray
area, where you want to try out various different sets of data to see whether they are valid or fail your
script.
To set up data for subsequent tests: When you test an SAP System, it is very likely that you will
have to set up certain data before many of your actual test cases can be performed. For example, if
you are implementing Warehouse Management and want to test material movements, you need a
warehouse with goods in it that you can move. This means setting up the warehouse and the
required material masters, then posting some inbound goods to stock the warehouse. Now you can
actually test the material movement!
In CATT, you could store test data alongside the test procedure that is, within the same object. Although
this had the advantage that you could execute the procedure quickly and easily, it did mean that the data
that you had was not reusable with other scripts.
In the design for eCATT, this was changed. Test data is now not stored in the eCATT test script, but in
separate objects called test data containers. The fact that the data is now separate makes it easier to reuse,
since data from a single container can be assigned to any number of eCATT scripts. Furthermore, scripts
can draw on data from more than one test data container. This allows you to store logically-grouped data in
separate test data containers and merge it with other data into a single test case in the form of a test
configuration.
In this article, I want to show you the relationships between test scripts, test data containers, and test
configurations and, using a worked example, show you how to plan a strategy for managing test data.
C:\Jon\eCATT\Documents\TDC_Example_Paper.doc Page 3
eCATT: Test Configurations and Test Data Containers
Fig. 1: Passing parameters to a script in a REF command (top) or from a test configuration (bottom)
C:\Jon\eCATT\Documents\TDC_Example_Paper.doc Page 4
eCATT: Test Configurations and Test Data Containers
C:\Jon\eCATT\Documents\TDC_Example_Paper.doc Page 5
eCATT: Test Configurations and Test Data Containers
maintained for the various importing parameters of the script. Later you will see how to control whether this
variant is actually executed or not.
So we can now start to assign the data with which we want to execute the test case. For example, a set of
variants might look like this:
NAME I_AIRLINE I_FLIGHT I_DATE I_PRICE I_CURR I_PLANE_TYPE I_CAP_E I_CAP_B I_CAP_F
There are two comments that we can make about this table already, the most striking of which is the
redundancy of so much of the data the combination LH 400 appears four times, QF 005 twice, and the
plane type 747-400 (along with the capacity of the aircraft) five times. The second thing that may have
occurred to you is the way in which much of the data falls into two distinct groups the airline code and flight
number on the one hand, and the aircraft type and its capacity in each of the three classes on the other.
AA 0017 LH 0400
LH 0400
LH 0400
QF 0005 LH 0400
QF 0005
UA 0945
QF 0005
C:\Jon\eCATT\Documents\TDC_Example_Paper.doc Page 6
eCATT: Test Configurations and Test Data Containers
The parameters of a test data container work in a similar fashion to the parameters of a script. Each must
have at least a name and a type.
Assuming, therefore, that we have created two test data containers for our scenario one containing the
airline and flight number, the other containing the aircraft type and the numbers of seats in first, business,
and economy class, we now need a way of using those data in our test configuration.
Hint: To look at the definition of a test script or test data container, just double-click its name in the
test configuration editor.
You start the variant wizard from the Variants tab of a test configuration using the wand icon (see fig. 8). It
consists of two areas. On the left-hand side, you can see the contents of one test data container. Within this
area, you can use the buttons at the bottom of the dialog box to scroll through the various test data
containers assigned to the test configuration. On the right-hand side, you can see the variants currently
assigned to the test configuration (that is, the sets of data that will actually be executed in the configuration).
In this area, you can only add data to the variants by adopting values from one of the test data containers.
However, once you leave the variant wizard, you can fill in any gaps manually.
The variant wizard allows you to
C:\Jon\eCATT\Documents\TDC_Example_Paper.doc Page 7
eCATT: Test Configurations and Test Data Containers
C:\Jon\eCATT\Documents\TDC_Example_Paper.doc Page 8
eCATT: Test Configurations and Test Data Containers
Remember that this operation only fills fields that are currently empty. If you want to replace values, you
must first clear the existing values by selecting the relevant cells and clicking the trash can icon.
If you want to transfer the value of a single field from a test data container to a variant in the configuration,
single-click the field in the test data container display (left-hand side), then single-click the target field on the
right-hand side. Now choose Link Individual Field. To add the single value to the entire column in the
configuration (that is, to use the same value in every variant useful, for example, for fields like Company
Code or Sales Organization), choose Insert Field in Column instead. Remember again that this operation
only works on cells that are currently empty.
On returning to the test configuration editor by choosing Continue in the bottom right-hand corner of the
variant wizard, you will see something like this:
C:\Jon\eCATT\Documents\TDC_Example_Paper.doc Page 9
eCATT: Test Configurations and Test Data Containers
4 Conclusion
Test configurations allow you to create powerful data-driven test cases while keeping the data separate from
the test scripts themselves. This clean division is more than just nice-to-have in terms of the aesthetics of
software design, it also makes it easier to separate the tasks of creating test scripts and assembling test
cases. Furthermore, the addition of test data containers to the testing environment allows you to separate
your test data even from a particular test configuration, increasing the potential for reusing this data and,
through this reuse, reducing the amount of effort required to create consistent automated test cases across
the whole scope of a particular test project. Since test data containers are extensible, you can even reuse
them across several releases by adding additional parameters and sets of data as required.
C:\Jon\eCATT\Documents\TDC_Example_Paper.doc Page 10