Skip to main content

Assertions

setAssertType(String: value)

Indicates the behavior after failing assert type. The value must be Fail, FailAtEnd, or Warning. Default is Fail.


assertTrue (Boolean:value) →Boolean

Asserts if a boolean is true. The result is a boolean indicating if the assert failed if the assert type is "Warning" or "FailAtEnd" . It will fail if the assert type is "Fail". It will fail at the end of script execution if the assert type is "FailAtEnd"


assertFalse(Boolean:value) →Boolean

Asserts if a boolean is false. The result is a boolean indicating if the assert failed if the assert type is "Warning" or "FailAtEnd" . It will fail if the assert type is "Fail". It will fail at the end of script execution if the assert type is "FailAtEnd"


assertNull(Boolean:value) →Boolean

Asserts if an object is null The result is a boolean indicating if the assert failed if the assert type is "Warning" or "FailAtEnd" . It will fail if the assert type is "Fail". It will fail at the end of script execution if the assert type is "FailAtEnd"


assertNotNull (Boolean:value) →Boolean

Asserts if an object is not null. The result is a boolean indicating if the assert failed if the assert type is "Warning" or "FailAtEnd" . It will fail if the assert type is "Fail". It will fail at the end of script execution if the assert type is "FailAtEnd"


assertContains (String:full, String snipped) →Boolean

Asserts if the full text contains the snipped text. The result is a boolean indicating if the assert failed if the assert type is "Warning" or "FailAtEnd" . It will fail if the assert type is "Fail". It will fail at the end of script execution if the assert type is "FailAtEnd"


assertDoesNotContain (String:full, String snipped) → Boolean

Asserts if the full text does not contain the snipped text. The result is a boolean indicating if the assert failed if the assert type is "Warning" or "FailAtEnd" . It will fail if the assert type is "Fail". It will fail at the end of script execution if the assert type is "FailAtEnd"


assertEquals (Any:A, Any:B) → Boolean

Asserts if both elements are the same. The result is a boolean indicating if the assert failed if the assert type is "Warning" or "FailAtEnd" . It will fail if the assert type is "Fail". It will fail at the end of script execution if the assert type is "FailAtEnd"


assertNotEquals (Any:A, Any:B) → Boolean

Asserts if both elements are not the same. The result is a boolean indicating if the assert failed if the assert type is "Warning" or "FailAtEnd" . It will fail if the assert type is "Fail". It will fail at the end of script execution if the assert type is "FailAtEnd"


assertGreaterThan (Number:first, Number:second) → Boolean

Asserts the first number is greater than the second. The result is a boolean indicating if the assert failed if the assert type is "Warning" or "FailAtEnd" . It will fail if the assert type is "Fail". It will fail at the end of script execution if the assert type is "FailAtEnd"


assertLessThan (Number:first, Number:second) → Boolean

Asserts the first number is lesser than the second. The result is a boolean indicating if the assert failed if the assert type is "Warning" or "FailAtEnd" . It will fail if the assert type is "Fail". It will fail at the end of script execution if the assert type is "FailAtEnd"


assertGreaterOrEqual (Number:first, Number:second) → Boolean

Asserts the first number is greater or equal than the second. The result is a boolean indicating if the assert failed if the assert type is "Warning" or "FailAtEnd" . It will fail if the assert type is "Fail". It will fail at the end of script execution if the assert type is "FailAtEnd"


assertLessOrEqual (Number:first, Number:second) → Boolean

Asserts the first number is lesser or equal than the second. The result is a boolean indicating if the assert failed if the assert type is "Warning" or "FailAtEnd" . It will fail if the assert type is "Fail". It will fail at the end of script execution if the assert type is "FailAtEnd"


assertRange(Number: number, Number: min, Number: max) → Boolean

Asserts the first number is between the min and max. The result is a boolean indicating if the assert failed if the assert type is "Warning" or "FailAtEnd" . It will fail if the assert type is "Fail". It will fail at the end of script execution if the assert type is "FailAtEnd"


Last updated: June 02, 2023

If you have any feedback on this topic, please contact us at documentation@appvance.ai