There are several ways to prepare sample data to be used for generated
business objects in a benchmark:
You can save a business object to a file from Test Connector and use it as
an input file of sample data for a benchmark.
To implement this approach, see Chapter 9, Test Connector Tool in the
Collaboration Development Guide.
The advantages of this approach are:
- You may already have some test data files saved from when the component or
interface was tested during development, allowing you to use existing
work.
- The graphical interface of Test Connector makes it easy to supply specific
values so that you can conveniently handle the situations described in the
section "Special formatting operations".
- You run the benchmark wizard only once. If you use the technique "Generating workload to a file", then you must run the benchmark wizard once to create the
benchmark definition and a second time to create the file of sample data for
it.
The disadvantages of this approach are:
- You must create all the test data by hand. If you use the technique
"Generating workload to a file", then the process is automated.
- Test Connector cannot bind to a connector agent that is a participant in
an enabled benchmark definition so you must either prepare the test data
before defining the benchmark, or you must disable the benchmark if it already
exists.
You can save a business object to a file from Map Designer and use it as an
input file of sample data for a benchmark.
To implement this approach, see Chapter 4, Compiling and Testing Maps
in the Map Development Guide.
The advantages of this approach are:
- You can use Map Designer to generate test data even if the benchmark
definition already exists and is enabled. Although Map Designer and
Test Connector share many advantages, this is one respect in which using Map
Designer for generating test data is more convenient.
- You may already have some test data files saved from when the component or
interface was tested during development, allowing you to use existing
work.
- The graphical interface of Map Designer makes it easy to supply specific
values so that you can conveniently handle the situations described in the
section "Special formatting operations".
- You run the benchmark wizard only once. If you use the technique "Generating workload to a file", then you must run the benchmark wizard once to create the
benchmark definition and a second time to create the file of sample data for
it.
The disadvantage of this approach is that you must create all the test data
by hand. If you use the technique "Generating workload to a file", then the process is automated.
You can copy business object data that is output to the tracing destination
of a connector at higher trace levels and use it as an input file of sample
data for a benchmark.
To implement this approach, do the following:
- Set the trace level for the connector to a level at which it outputs the
contents of the business objects it processes.
- Trigger a business object of the appropriate type and have the connector
process it.
- Copy the business object contents from the tracing destination into a
file.
Business object data is recorded in a kind of markup language:
elements like attributes, child objects, and the entire top-level business
object are demarcated by pairs of tags. Each business object begins
with a set of StartHeader and EndHeader tags, which is
followed by a StartBO tag that includes the type of the top-level
business object. Below is an example:
<StartHeader>
<Version = 3.0>
<EndHeader>
<StartBO:BusinessObjectType>
The output for a business object ends with an EndBO tag that
includes the type of the top-level business object just as the
StartBO tag does. Below is an example:
<EndBO:BusinessObjectType>
Copy all of the output from the StartHeader tag to the
EndBO tag.
- Important:
- The StartHeader tag might appear on a line that also contains
other text (such as information about the tracing subsystem), and the
EndBO tag typically appears on a line that ends with a right
bracket (]). Be sure to include only the important
tags; do not copy unnecessary characters, or the system cannot use the
file as input.
- Save the file.
The advantages of this approach are:
- You the benchmark wizard only once. If you use the technique "Generating workload to a file", then you must run the benchmark wizard once to create the
benchmark definition and a second time to create the file of sample data for
it.
- You can obtain production-quality test data with a minimum of
effort--the data can be taken from production environment tracing logs
and be an accurate image of the typical business entity. You do not
have to type the values by hand.
The disadvantages of this approach are:
- This technique is not as easy to use as other approaches.
- If you do not copy the business object contents properly, then the system
cannot use it to generate business objects.
You can use a feature of the benchmark wizard to generate a file of sample
data.
To implement this approach, do the following:
- Determine the location and name that you want for
the file of sample data to be generated.
- Note:
- If you plan ahead this way then you only have to run the benchmark wizard two
times--one time to create the benchmark definition and a second time to
generate the input file. If you do not plan ahead then you have to run
the benchmark wizard a third time to reconfigure the benchmark definition to
use the input file.
- Prepare a benchmark definition. Follow the
instructions in the section "Preparing a benchmark definition".
- When you are presented with the Benchmark Components screen, specify the
file path and name you determined in step 1, as described in step 7 of the section "Configuring benchmark components".
- Proceed through the Object Properties screen and finish the benchmark
definition.
- Follow the instructions in the section "Generating workload to a file" to create a file of sample data for the benchmark definition
created in step 2.
The advantage of this approach is: that you can conveniently generate
a large amount of sample data through configuration and metadata.
The disadvantages of this
approach are:
- You must run the benchmark wizard once to create the benchmark definition
and then a second time to generate sample data for it.
- In order to customize the sample data to handle situations like those
described in the section "Special formatting operations", you must edit the text file by hand, replacing all the
generated values with values that meet the required subset or format.
