Advanced comparison options
This page provides for brief information about the advanced comparison options that you can specify to define how the Test Organizer module operates.
Types of data outputs in Test Organizer
From the Test Organizer point of view, there are two possible data outputs for your database objects:
- Parameter (e.g. OUT variable from your procedure, RETURN value in your function, etc.);
- Dataset (e.g. REF CURSOR which is returned from your Oracle procedure, SELECT… at the end of your SQL Server procedure or just simple SELECT from table or view, etc.)
- Affected object (e.g. tables)
NOTE: This document describes only the options for Datasets and Parameters
Options types
Compare options are divided into the next categories:
- Data types options;
- Comparison options;
- Collect options.
Data types options — options to use for different data types (Numeric, Character, etc.) for more efficient comparison.
Comparison options — specific options for specifying how to make a compare and when the comparison should be over.
Collect options — results that need to be saved for further report or displaying.
Compare options in Test Organizer
In the Test Project, Compare options should be available on several levels:
- in GROUP;
- in Test.
On GROUP, we can set only general options for the comparison of all data outputs.
On Test, we can set the following options:
- general options for all data outputs comparison;
- separate a dataset;
- separate a column in a specific dataset;
- separate a parameter.
For Datasets, you may set Data types, Comparison, or Collect options.
For Columns, only Data type options are available.
For Parameters, only Data type options suitable for the type are available.
Datasets are listed by numbers. (e.g. if you specify DATASET (1)], it means that all the settings you specify should be applied to the Dataset with the ordinal number 1).
Parameters and columns are listed by names. (e.g. if you specify Column [ID] it means that all settings which you specify should be applied to the Columns with the name in the list (ID).)
NOTE: the Key columns option can’t be set on the Group level.
Options overriding
By default, the options set on the Project level are used for comparison. If the user wants to set specific value options for a Test or a Group, he should set the Override parent options to True. Then, the options set will be applied for this element and its children. If the Override parent options option is in False, the specific settings will not be lost, but they will not be applied during the comparison.
This may be set on a Group or a Test level.
Data types options
Numeric data types
Use scale
Scale is used for comparing numeric values. Here you can specify a custom scale. When the custom scale specified, numeric values will be compared to it.
Note: Scale — the number of decimal digits in a fraction part. Numeric values will be rounded to the scale that you set. For example, the 123.45 number has a scale of 2.
Possible values: positive digital or not set.
Default value: not set.
Examples:
The data row on the leaft side has the 3.14 value. The data row on the right side has the 3.14159265359 value in the matched columns.
- The scale is not used — values are compared as they are, so the values aren’t equal.
- The scale is set to 2 — the right value is rounded to 3.14, so the values are equal.
- The scale is set to 4 — the right value is rounded to 3.1416, so the values aren’t equal.
Note:
Floating-point numbers will be rounded after bringing to the canonical exponential format.
Example: value = 72.1253, scale = 2.
Conversion: 72.1253 -> 7.21253 E+1.
Rounding: 7.21253 E+1 -> 7.21 E+1.
Use tolerance
Tolerance defines the difference in percent to consider 2 numeric values equal. The minimal supported value is 0.001%.
Possible values: positive digital or not set.
Default value: not set.
Examples
On the left side, the data row has the 3.14 value, on the right side, the data row has the 3.14159265359 value in the matched columns.
1. Use tolerance is not set.
The values are compared as they are, so the values are not equal.
2. The Use tolerance value is set to 5%.
The values are equal because the difference is less than 5%.
3. The Use tolerance value is set to 0.01%.
The values aren’t equal because the difference is greater than 0.01%.
Text data types
Trimming mode
This option allows you to configure the trimming mode for spaces in the values of the string datatypes.
None: | If you select this mode, the application will compare all the string values as are (without modifications). |
Leading: | If you select this mode, the application will trim leading spaces in the string values before comparison. |
Trailing: | If you select this mode, the application will trim spaces at the end of string values before the comparison. |
Both: | If you select this mode, the application will trim spaces at the beginning and at the end of the string values before the comparison. |
Possible values: None, Leading, Trailing, Both.
Default value: None.
Ignore case
This option allows you to compare string values without paying attention to the character case.
Possible values: True or False.
Default value: False.
Treat empty as null
This option allows the application to use NULL instead of the Empty value during the comparison.
NOTE: Also applies to a Binary data type.
Possible values: True or False.
Default value: False.
Data and Time data
Date Comparison mode
This option allows you to adjust the comparison of Date or DateTime values.
Full: | If you select this mode, the application will compare the Date and DataTime values as are (without modifications). |
Do not compare: | If you select this mode, the application will ignore all the Date and DataTime values during the comparison. |
Ignore time: | If you select this mode, the application will compare only the date (without time) of the DateTime value. |
Ignore milliseconds: | If you select this mode, the application will ignore milliseconds during the comparison. So, the time value will look like ‘hh:mm:ss’. |
Possible values: Full, Do not compare, Ignore time, Ignore millisecinds.
Default value: Full.
Ignore time zone
This option allows you to compare the Date or DateTime values without Time Zone.
Possible values: True or False.
Default value: False.
Comparison options
Use row limit
Indicate how many rows will be compared during the operation. After exceeding the number of rows, the comparison will be stopped.
Possible values: Positive digit.
Default value: Not set.
Count of max differences
Indicate the limit of not equal rows and not matched rows during the comparison. Stop the operation after. If this option is not set, this means that no limit set.
Possible values: Positive digit.
Default value: 100.
Key columns
Indicate which columns will be used for the matching rows. During the comparison, we need to take some unique set of columns to understand which row needs to compare each another row. Migration platform takes the decision of matching or not row by Key columns comparison.
NOTE: If “Key columns” are not set then the app uses the first column of the dataset for matching rows.
Input format: case sensitive name of columns from the Source. Sign ‘;’ is used as separator.
Possible values: Any text or is not set
Default value: is not set
Unsorted data
Indicates that data is unsorted and need to take additional sorting on the application side. Columns from ‘Key columns’ option are used for sorting if this option is set, in other way sorting performs by the first column from the dataset.
Possible values: True or False.
Default value: False.
Example
If “Is unsorted data” is false — do nothing with the dataset.
If “Is unsorted data” is true and “Key columns” option is not set — the app performs sorting a dataset by the first column in the dataset.
If “Is unsorted data” is true and “Key columns” option is set with column ‘ID’ — the app performs sorting dataset by ‘ID’ (if ‘ID’ is present in the dataset), the dataset sorting is performed by the first column in the dataset.
Ignore unmatched columns
Indicate take to attention existence columns with not have pair on another side. If set in True than existence unmatched column ignores on a result, if set in False than take partition in decide of equals data.
Possible values: True or False.
Default value: False.
Example
We have 4 columns on the Source and 5 columns on the Target, and the data in the 4 columns pairs is equal. If Ignore unmatched columns set in True, then the comparison result is Equal. If set in False, the comparison result is False.
Treat empty result from both sides as equal
Indicate how to interpret empty results from both sides: equal or not equal.
NOTE: The empty result means that the returnable data set doesn’t have rows.
Possible values: True or False.
Default value: True.
Collect options
Equal rows
Indicate that equals rows will be collected during the comparison.
Possible values: True or False.
Default value: False.
Not equal rows
Indicate that not equals rows will be collected during the comparison.
Possible values: True or False.
Default value: True.
Not matched rows
Indicate that not matched rows will be collected during the comparison.
Possible values: True or False.
Default value: True.
Didn’t find the answer?
You can report problems, ask questions or share ideas for improvements on our email [email protected].