Parametarize iterations from excel in BDD Scenario Outline
How can I read data from excel and parametarize in BDD Scenario Outline, using Javascript
Yo Durga,
I did not understand your algorithm corectly (If You want You can write here mofe specification) and i think I can help You write this script.
From this informations that i already know i think You can:
1) You can ready currently running "Count" variable by using:
https://support.smartbear.com/testcomplete/docs/reference/project-objects/project/testitem/count.html2) If You want to have data like "How many rows i need to iterate" and use it in more than one test script then use this Project variables:
3) "But as I have 100's of records and I want to set multiple iterations for scenario based on external file records (Excel). "
Read all records -> put it inside object -> save as Project Variable (if needed) -> Use objects keys to identificate which of excel records i am runing from excel in loop.
Or You can use "OnstartEvent"/"OnEndEvent":
https://support.smartbear.com/testcomplete/docs/reference/events/index.html
To iterate all keys from object in Js use this solution:
for (const [key, value] of Object.entries(objParametrowDoZaznaczenia)) { // custom actions }