🛂AutomationAsserts
In our testing framework, AutomationAsserts is a key component that provides various methods for asserting conditions in tests. These methods are used to verify that the application behaves as expected. Below is an explanation of each type of assertion available through AutomationAsserts, referenced against various validation types:
Exact Text Comparison
Assertion:
assertEqualsUse: Validates that the actual text obtained from the application matches exactly with the expected text.
Reference: Often used in scenarios marked as
EQUALin validation types.
Boolean Condition Validation
Assertions:
assertTruefor positive conditions,assertFalsefor negative conditions.Use: Checks if a condition (like an element being visible or a button being enabled) is true or false.
Reference: Tied to validation types like
IS_DISPLAY,IS_BUTTON_ENABLE, andIS_BUTTON_DISABLE.
Non-Matching Text Check
Assertion:
assertNotEqualsUse: Ensures that two pieces of text are not the same, verifying that certain text changes under different conditions.
Reference: Related to
ATTRIBUTE_VALUE_NOT_PRESENTvalidation type.
Case-Insensitive Text Comparison
Assertion:
assertEqualsIgnoreUse: Compares two texts for equality, disregarding any case differences (upper or lower case).
Reference: Used for validation types like
EQUAL_IGNOREandATTRIBUTE_EQUAL_IGNORE.
Attribute Value Verification
Use: Involves assertions that check if an element's attribute has a specific value or state.
Reference: Linked to validation types such as
ATTRIBUTE_VALUE_PRESENTandATTRIBUTE_VALUE_NOT_PRESENT.
Custom Checks
Use: Allows for implementing custom validation methods that are not covered by standard assertions.
Reference: Corresponds to the
CUSTOMvalidation type.
Information Logging
Assertion:
infoUse: This method is used for logging informational messages in the test report, not for validation.
Reference: Used across various validation types for adding context or details in the report.
Understanding and effectively using these AutomationAsserts methods in conjunction with the designated validation types is crucial for creating thorough and reliable automated tests. They ensure that each test step not only executes as intended but also accurately verifies the expected outcomes.
Last updated
Was this helpful?