In this section:
Another way to parameterize tests is with values stored in a data source. For example, you can configure SOAtest to send data source values as part of a request to a server. The values that SOAtest receives in response can then be compared to another data source value to check if the response received is correct. SOAtest will check each available combination of data source rows. This behavior is particularly useful if you want SOAtest to perform functional testing on a number of different inputs stored in a data source.
The following shows a request message element that is parameterized to use keywords stored in the Keywords column of the Books data source:
Parameterized values can be used for other tools as well; for example, they could be used in assertion validations:
For details on how data source values can be applied in functional testing, see Performing Functional Tests Using Data Sources.
SOAtest can perform functional testing using values from any of the following types of data sources:
- Data repository
- CSV files
- Excel spreadsheets
- Tables created in (or copied into) the internal table editor.
- Data group
- Java Beans
Tip- Generating a Data Source Template for Populating Message Elements
Manually creating a data source for parameterizing large, complex XML messages can be time-consuming and tedious.
For a fast way to accomplish this, have SOAtest automatically generate a CSV data source template based on the structure of the request or response message that you want to parameterize. Columns in the generated data source are automatically mapped to the appropriate elements in the request or response message. The only thing you need to do is add values to the generated data source template.
For details, see Generating a Data Source Template for Populating Message Elements.
Understanding Data Groups and Aggregate Data Source
SOAtest lets you create and use two types of combined data sources:
- A data group can include a number of similar data sources that have at least one column in common; it allows you to select which data group should be applied at any given time. This is especially useful if you want to dynamically specify different data sources for the same tool. You can quickly switch which data source is used at runtime without having to edit tools or data sources. To use data groups, you group together data sources with shared columns and then specify which data source should be active.
- An aggregate data source takes a number of different data sources and treats them as a combined data source. This is especially useful if you would like to perform a functional test that needs to draw values from multiple data sources. For example, in sending a request to a server, you may want to send values from a data source that contains user information such as a first and last name, and you may also want to send values from a separate data source that contains the user’s login and password information. By combining the two data sources into a single aggregate data source, you can create a single test instead of having to create separate tests for each data source.
A Data Group is similar to an Aggregate Data Source in the sense that they are both made up of other data sources. However, a Data Group allows access to only the common columns shared across all data sources; an Aggregate Data Source aggregates all of the columns from the various data sources. Moreover, an Aggregate Data Source makes all data values available at a single time. A Data Group allows you to determine which set of values is used at any given time.
Video Tutorial: Using Data Sources to Parameterize Tests