Validating Data Tables in Eggplant Functional
Data tables are a common component of many desktop, web, and even some mobile applications. All industries use software that leverages data tables in some way, such as for displaying hospital patient lists, financial data, or open job opportunities.
Common use cases surrounding data tables include validating that the content displayed by a data table in an application UI mirrors the content of the underlying database, or validating that a record submitted in a form persists and is displayed later in the application's data table. Data table validation with the Eggplant Functional (EPF) test automation tool is powerful and leverages the advanced scripting and database access capabilities of SenseTalk.
Data Table Validation in Action
The following video shows examples of Eggplant Functional validating different aspects of distinct data tables.
Tech Talk
These SenseTalk commands, functions, variables, and syntax are used in data table validation, and are referenced in the above video.
Scripts for Data Table Validation
The following scripts can be used for validating tables.
Compare records script: This script retrieves all data rows from a database and from a displayed data table, and compares their contents.
//The script leverages functions stored in the RetrieveRecords script
put RetrieveRecords.fromUI into ActualRecords
log "The actual records are:"
LogAllRecords ActualRecords
log "-------------------------------------------------------"
put RetrieveRecords.fromDB into ExpectedRecords
log "The expected records are:"
LogAllRecords ExpectedRecords
If ActualRecords = ExpectedRecords
LogSuccess "The record sets match."
else
LogError "The record sets don't match."
End If
If item 5 of ActualRecords = item 5 of ExpectedRecords
put item 5 of ActualRecords
put item 5 of ExpectedRecords
LogSuccess "The 5th records match."
End If
on LogAllRecords RecordList
repeat with each item of RecordList
Log it
end repeat
end LogAllRecords