rajs2020
4 years agoFrequent Contributor
Data driven testing - How to create and use a table data source with a groovy script?
In ReadyAPI, I want to create a "table" of test data by using a Groovy Script block inside a Data Source block. I will generate the data for the "table" with custom logic/code. The "table" can have multiple columns and each row represents a set of test data.
I want to use the "table" in a data source loop & make a REST API call inside the loop. The API call should be able to access all the columns inside each row. To summarize, think of this as a groovy script which provides DataGenerator + Grid data sources.
So, how do I generate a table of data with a Groovy Data Source? Is there a recipe for this?
Keywords - data driven tests, Data Source, tabular test data, test data table.