Assertion Operations

When working on any platform, assertion / checks plays a key role in validation. In scenarios like below :

  1. Asserting the data which was extracted from the UI against the Test data.

  2. Asserting the data which was extracted from the API against the Test data.

  3. Asserting the data which was extracted from the API against the Database.

There were multiple ways we can do the assertion as follows.

assertField("product element name","UI element type");

assertElement("UI element name", "text/attr name","DATA");

stateCheck("UI element name", "text/attr name","DATA");

assertGroup("Group name", "UI element type");

Assertion Operations

Prop Name : prop.assert.[UI Element Type].operation

IF the assertion was performed at API / DB level -> UI element type was optional.

Data TypeOperator

String

equals

String

notequals

String

equalswithcase

String

startswith

String

endswith

String

contains

String

regex:

String

stringlength>int

String

stringlength>=int

String

stringlength<int

String

stringlength<i=nt

String

stringlength>int

date

before: int

date

after : int

Integer

>

Integer

=

Integer

>=

Integer

<

Integer

<=

Integer

<>

Decimal

>

Decimal

=

Decimal

>=

Decimal

<

Decimal

<=

Decimal

<>

QStringArray

sorted

QStringArray

startsWith

QIntegerArray

All operators of Integer data type can be given

Last updated