Miscellaneous Asserts

The following list is a collection of asserts that can compare a variety of object types.

Expression

Expression

IconDescription
SentryOne Test ExpressionThe Expression assert lets you enter a free-form expression to use more powerful combinational logic to validate that one or more resource values are correct.

Expression Editor

SentryOne Test Expression Element Editor

FunctionDescription
Language
Select the expression language. Currently only the SimpleFilter language is available.
Filter Expression

To add a clause to the expression, simply select the resource in the left hand combo box, choose the operator in the middle combo box and type the value you require in the right hand text box. Selecting the button adds the specified clause to the expression. For more information about filter expressions, please see the filtering topic.

Note:  Help on the filtering language is also available in the editor directly by selecting on the ? icon in the bottom right.


Often when filtering, whether in SQL or using SentryOne Test filters, the identifiers relate to field names. In this instance, the identifiers relate to resource keys. For example, if there was an Execute Query Scalar action that generated a resource called MyScalarValue then the expression could include a clause such as [MyScalarValue] > 10.

Integer Comparison

Integer Comparison

IconDescription
SentryOne Test Integer ComparisonThe Integer Comparison assert tests two integers for different levels of equality. Specify to test for greater than, less than, or even user defined tolerances. The integer to compare your actual value to can either be a static value defined in the element's editor, or from another resource key.

Important:  The Integer Comparison assertion is now deprecated. While existing projects can still continue to use it, new products should migrate to using the Value Comparison assertion.

Integer Comparison Editor

SentryOne Test Integer Comparison Properties

FunctionDescription
Comparable Resource Key Select a resource key you want to compare against if you opt not to use a static value to compare.
Comparable Value SourceSpecifies if the element should use a static value or a resource key to make the comparison.
Comparison Mode
ModeDescription
EqualAsserts that the two integers are equal.
NotEqualAsserts that the two integers are not equal.
LessThanAsserts that the integer is less than the static value or resource.
GreaterThanAsserts that the integer is greater than the static value or resource.
Within Percentage ToleranceAsserts that the integer is within a specified percent of the static value or resource.
Within Fixed ToleranceAsserts that the integer is within the specified tolerance range of the static value or resource.

Comparison ValueThe static value to use if you opt for a static value over a resource.
Resource KeyThe resource key of the integer you want to compare.
ToleranceSpecifies the fixed or percent tolerance.
Range Check

Range Check

IconDescription
SentryOne Test Range CheckThe Range Check assert checks a resource key's value to see if it's between the user set maximum and minimum value.

Range Check Editor

SentryOne Test Range Check Properties

FunctionDescription
Maximum ValueThe maximum allowable value for the Value Resource Key.
Minimum ValueThe minimum allowable value for the Value Resource Key.
Value Resource KeySelects a resource key where you want to compare a value.
Scalar Comparison

Scalar Comparison

IconDescription
SentryOne Test Scalar ComparisonThe Scalar Comparison assert takes the result of an Execute Scalar action and compares with either a static value or another scalar result. The scalar values can be several different types, each with their own specifications of equality.

Important:  The Scalar Comparison assertion is now deprecated. While existing projects can still continue to use it, new products should migrate to using the Value Comparison assertion.

Scalar Comparison Editor

SentryOne Test Scalar Comparison Element Editor

FunctionDescription
Comparable Resource KeyEnter the resource key for the dynamic value if you do not opt to use a static value to compare against.
Comparable Value SourceSpecify whether to use a static value or a dynamic value from another resource key.
Comparison TypeSpecify the type of the value to compare:
  • Boolean
  • Decimal
  • Guid
  • Text
  • DateTime
  • Floating Point
  • Integer

Equality TypeSpecify the equality type:  
  • Equal
  • Within Percent Tolerance
  • Not Equal
  • Within Fixed Tolerance
Resource KeyThe value to compare.
ToleranceSpecify fixed or percent tolerance for certain value types.
Value Comparison

Value Comparison

IconDescription
SentryOne Test Value ComparisonThe Value Comparison assert is a general purpose comparison for comparing two single values. It supersedes both the Integer Comparison and the Scalar Comparison assertions, presenting a simpler configuration while also significantly extending the available options.

Value Comparison Editor


SentryOne Test Value Comparison Element Editor Static Value
Static Value


SentryOne Test Value Comparison Element Editor Resource
Resource

There are four main sections to the editor: 

FunctionDescription
Actual ValueThis is the value that you want to validate. It always comes from a resource that's available in the test. To select the resource to test, select the arrow to the right of the resource name box.
Expected ValueThis is the value that you expect the actual value to match. This can either come from a static value that you configure in the user interface or from a resource. If you're using a static value, type the value that you want into the static value box. If your're using a resource then select that option and pick the resource in the same way you did for the actual value.
Comparison

This section specifies the options that we use for comparison:

ComparisonDescription
Data type
Detected automatically when the actual and expected values are entered, but can be changed manually to use a different type for the comparison if necessary.
Comparison type
This is the type of comparison that you want to use, and different types are available for different comparison types.

For example, 'GreaterThan' is not available for boolean comparisons and 'StringMatch' is not available for integers. Some comparison types have additional configuration options, which are detailed below.

For comparison types 'WithinFixedTolerance' and 'WithinPercentageTolerance' the tolerance options are visible. There is the choice of entering a symmetric tolerance (i.e. same amount of tolerance up and down) or the values for the upper and lower tolerance can be entered specifically. By way of example, in the image above where we are validating within a fixed tolerance of 11 with 5 down and 10 up, values between 6 (11-5) and 21 (11+10) would pass the check.

For comparison types 'StringMatch' and 'RegexMatch', additional string comparison options are available - including whether to ignore case, ignore line endings and trim spaces from the start / end of the values to compare. An example of this is shown in the image below.


SummaryProvides a plain text description of what's configured in the assertion editor.
Xml Comparison

Xml Comparison

IconDescription
SentryOne Test Xml ComparisonThe Xml Comparison assert compares two Xml resources. These resources can be loaded many different ways, such as a from a Load Asset that's loading a File Content Asset, result of a query, or even from a Get Properties Action. The Xml in the resource passes in as a string, and checks if it's valid Xml compared to the other resource.

Xml Comparison Editor

SentryOne Test Xml Comparison Properties

FunctionDescription
Actual Xml Resource Key
 The resource key for the Xml you want to compare.
Compare Attribute Order
When enabled, the comparison compares the order of attributes in an element, before comparing the content. If left disabled, only the attribute value is compared.
Expected Xml Resource Key
The resource key for the Xml you want to compare the Actual Xml against.
Ignore White Space
Specifies whether to ignore any extra spaces or white spaces in or around elements.
Actual XPath Exclusion
This field takes an XPath string that executes against the Actual Xml once it loads. Elements found by the XPath are excluded from the comparison on the Actual side only. This field can be a (pipe) delimited string, allowing for multiple XPath items to execute.
Expected XPath Exclusion
This field takes an XPath string that executes against the Expected Xml once it loads. Elements found by the XPath are excluded from the comparison on the Expected side only. This field can be a (pipe) delimited string, allowing for multiple XPath items to execute.
Actual XPath Comparison
This field takes an XPath string that executes against the Actual Xml once it loads. Only the elements found by the XPath are used in the comparison for the Actual side only.
Expected XPath Comparison
This field takes an XPath string that executes against the Expected Xml once it loads. Only the elements found by the XPath are used in the comparison for the Expected side only.