Forum Discussion
not sure how you read data from excel. ReadyAPI lib contains multiple jar packages to process data source (from excel), ie: jxl, poi,...
so you should read data according to your design and parse them refer to structure of test suite / test case.
generally, we would like to import data before test suite / test case execution, most of time should import data to Header / Payload / Parameter (properties). as you known, the data structure looks like map (key-value pair), so you can defined a data source like below:
(Example)
TestStepName Header Payload Parameters
Login cookie,mediaType content pageNumber, pageSize
Logout cookie,mediaType sessionId
Note: you can think about how to read data. as for load data into test step / test case / test suite. ReadyAPI provide corresponding methods to process it.
these data can save into a map, and then parse them when you need.
(example)
loop your test suite / test case / test step, and then lookup corresponding test step refer to current test step name.
for header, you can directly add a map
for payload, you can directly assign to request content
for parameters, you can load data refer to existing parameters. if existing, then add. or you can add all parameters you input in excel.
So should be flexible to load data from excel via groovy script. Checking your requirement and provide more details for community to figure out the best practice. Good luck
Related Content
- 6 years ago
- 3 years ago
- 5 years ago
- 5 years ago
Recent Discussions
- 21 days ago