Validating multiple records

How can I validate multiple fields on multiple records in a list view? i.e. I’m trying to validate multiple records, but I’m validating the same fields on each record. Do I have to filter down to one record and record steps in my test action for each record, one at a time?

Yes you should always filter for each individual row, and do your validations at index 0. The reason for this is that we can never guarantee the order in which records are returned from the DB. You might be tempted to rely on an application’s sort. But what happens when that sort changes, or new seed data gets added. It is tedious but crucial to avoid an unstable test. This might actually slower than recording all of the filtering and validating, but you could try recording all the validations at once, and then manually insert your filter steps, and remove the set context step that will get inserted for each row.

3 Likes

Thanks Jared! I’ve found that this option to validate the entire table works well, and saves a lot of time when creating the Test Action. But as you said, sorting the records first is important, and helps the Test Action be resilient to changes in the sort order.