How to get the row count of records in Test data service (TDS)
I want to get the row count of records in TDS.
The simplified version with less TestSteps:
- Optional: It is possible to specify an additional search pattern to only count specific records (e.g. status == "Success")
- The loop exits automatically if no new records are found, even without search pattern
- Find & provide record module or Expert module can be used.
- WARNING: Locked records are not counted!
Better alternative via TDS REST-API (faster, counts all records):
To count all records (include locked/consumed ones) is to use the TDS Rest-API.
----------------(Thank you Philipp Dessovic for referring the above solution)------------------------
Alternate way: (Warning: This method only counts unlocked records and can be simplified.)
We need to follow the below steps to get the row count.
- User Find & provide record module and trigger a required condition with constraints (if required). Example make != NULL
- Create a test case
- Inside test case, add Tbox set buffer step to initiate the "Counter" with value 0
- Include while loop -> in Condition verify any value != NULL
- In loop increase the counter with TBox set buffer module
- With the help of exit criteria !=, your test case will come out of the loop and your counter will be the total row count of TDS