Introduction to DataPool in Rationalization and practical application

zhaozj2021-02-16  51

This article uses DataPool to use DataPool while briefing the actual functional testing and performance testing. I hope to help the majority of software testers. Due to writing

DataPool is a test data set that provides a variable to the script when testing script playback. DataPool can be created by Rational Product Robot or TestManager, and the table below lists the operations that can be performed on DataPool in Robot and TestManager:

operating

Robot

TestManager

Automatically create DataPool in the test script

Create a test script and generate automatic data

Modify the DataPool settings in the VU script

Modify the DataPool field definition and modify the test data

Create and modify data types

Manage DataPool such as rename or copy

Pour into the data

Pour data

Remarks: There are two files in Rational, TXT and CSV files, will be saved after creating DataPool successfully.

Drive: / Project Directory / TestDataStore / DefaultTestScriptDataStore / TMS_DataPools Folder

Test data is saved in a text file with a CSV extension, all field information is saved in a file named SPC, which is managed by TestManager.

DataPool has two creative methods, one is built in TestManager, a Robot records the same name DataPool when a Robot records VU script, only in Robot Tools-> Session Record Options, set the generator page General's Use DataPool option to take effect . Below the next two creation and usage:

One.

Establish DataPool:

1. Start Rational TestManager;

2. Tools> Manage> DataPool, click New ..., enter the data pool name point "OK";

3. Add a field definition in the open Data Type Specification; (After the field definition is explained)

4. Generate data generate data (100 data generated by default here)

5. Modify data edit datapool data

Where field definition description:

1) Name refers to the data pool column title name consistent with the variables in the test script. If you change the data pool column name, you must ensure that the variables in the test script do a corresponding change; if you are not built in the Rational test environment and then import it, TestManager automatically assigns the default name. It is also necessary to ensure that the variables in the test script are consistent with them. You can use IME to give the DataPool field to the multi-byte name

2) TYPE standard or user-defined data types provide its value to the data pool column by name. It is like establishing a database, first establish a field name, and the type of change is changed.

The data classes that formulate data pool columns are as follows:

a, select a standard type or existing user-defined data type, click on the currently displayed data type name, and then select the new data type from the list.

b You can choose the standard data type in Rational.

c, if you want to customize a type name instead of choice, enter an asterisk before the user defines the data type, such as: * mydata;

D, establish a new user-defined data type, enter the data type name (not *), then click Return. Click Yes to make sure you want to create a user-defined data type,

For example: Create a new column, enter the column name, enter the demotype, save it. At this time, the Data Type Properties Edit dialog box (I entered the description information to Description, determine the button is not available, may be the Rational's bug, don't know if there is any rewards that tell Ratioan), determine, another data type property editing interface, Enter the test data and exit. Select this line to generate data, TestManager automatically creates data you entered. E, establish a new user-defined data type.

3) The order of the value of the sequence data type is written to the data pool column. As long as you choose from it: -random - Randomly writes the value of numbers and letters in the data pool column. -Sequential-sequential write, such as 0, 1, 2, 3, ... Sequential only supports numeric values ​​(including date and time) and the date type of the generated user-defined. When you choose a digital type, you must determine its maximum and minimum range, the interval must be greater than 0; -Unique is unique. You can also define the maximum minimum.

4) Repeat The time in the data pool is appeared, and the REPEAT cannot be 0. To set the uniqueness of the symbolic integer and user-defined data type, set Reapeat to 1. When defining a unique value, determine the number of generated numbers within your defined range.

5) The maximum number in the Length data pool column. This length includes decimal points and negative.

6) Decimals defines the largest floating point number, the maximum setting is 6 digits.

7) Interval If you set the interval in the data pool column, you will change in the order in order you set. The smallest interval is 1, the maximum interval is 99999 to select Sequence under the digital data type, and define the maximum and minimum range, the interval must be greater than 0. This setting is only valid when the digital settings are set.

8) Minimum determines that the minimum value this setting is only valid when the digital settings are set.

9) Maximum determines that the maximum value this setting is only valid when the digital setting is set.

10) SEED is Rational Test to calculate the number of random values. The same number of seeds produces the same random number, to change the random order, change the number of seeds.

11) Data file user-defined path path, this path is automatically paid, and cannot be modified. Data type files are stored in the Data Type directory in your project file and cannot be modified.

4, after setting the field, enter the number of records you want to generate in NO. of Records to Genarete, then click Genarete Data to generate data, or click the Save button, close the current window, then click Manage DataPools> Edit> Edit. DataPool data, direct manual input data;

5, this completes the creation of the data pool, and can perform an operation of editing, renovation, deletion, import, and export of the data pool;

6, the data pool has data generation capabilities, but does not have data computing power. In this case, other tools (such as Excel) can be utilized, and saved as CSV (comma-divided files) format, then imported in Manage DataPools;

Actual application:

The Development Department recently presented the login function of the existing software system. Test engineer design test case, found that the login system version is basically stable, and the function is isolated, and the possibility of changes in the future version is not large, so it is determined to test automation, reduce artificial repeat labor, improve test efficiency. The test engineer started using the black box test method equation, causal analysis, boundary value method, etc., the development function test script, uses DataPool (data in the data pool is the input value for design test cases) ) Save the test data. The login interface needs to enter a username, password, and establish two fields Username, Password. Data and test cases in DataPool are consistent in test cases.

转载请注明原文地址:https://www.9cbs.com/read-23772.html

New Post(0)