Forum Discussion
tristaanogre
14 years agoEsteemed Contributor
An array is essentially an in memory object that stores a list of items. Effectively, what I wrote for you above does what you need without having to create an Excel spreadsheet.
The "dispose" was so that, next time you run the test you're not re-using Application Numbers from before. What you would do is use the function I noted above during your run where you create the applications so that you can keep numbers in memory. Then, during your tests where you are releasing the applications, you would use a "for" loop to loop through the array up to the item count and, each time through the loop, release the application number.
If there is a particular requirement for persisting the Application Numbers after the test is complete, there's an article at http://smartbear.com/support/viewarticle/20878/ that documents how to write out to Excel. Your usage of the information would still need to be either using a Data Driven operator in a keyword test or a DDT.ExcelDriver in a script test to loop through the records and execute some action for each one.
The "dispose" was so that, next time you run the test you're not re-using Application Numbers from before. What you would do is use the function I noted above during your run where you create the applications so that you can keep numbers in memory. Then, during your tests where you are releasing the applications, you would use a "for" loop to loop through the array up to the item count and, each time through the loop, release the application number.
If there is a particular requirement for persisting the Application Numbers after the test is complete, there's an article at http://smartbear.com/support/viewarticle/20878/ that documents how to write out to Excel. Your usage of the information would still need to be either using a Data Driven operator in a keyword test or a DDT.ExcelDriver in a script test to loop through the records and execute some action for each one.