Forum Discussion
Hi,
By analyzing your problem, I think you can use saving values in:
Design variable - with this solution you can save the value between test iterations.
Doc: https://support.smartbear.com/testcomplete/docs/testing-with/variables/collections/project-and-project-suite/index.html
Write in a variable in a script - if your test is called in one function, it will be easy to write the value in the variable.
Doc: https://stackoverflow.com/questions/19211768/saving-a-javascript-variable-for-later-usage
Use excel file - save data in excel and read specific cells according to the test iteration.
Doc: https://support.smartbear.com/testcomplete/docs/testing-with/advanced/working-with-external-data-sources/excel/index.html
Depending on which programming language you use, use random values to generate a variable value.
Example in JS: https://www.w3schools.com/jsref/jsref_random.asp.
There was no format. for testing purpose ,I can enter any Receipt number .
if my Receipt number for first run is "123" and for second run my receipt number should not enter "123", it should go for another number say ex"456" etc. and for third run Receipt number should enter another number and so on...
In javascript, if you a not limited by size, enter the value of Win32API.GetTickCount() will give you an unique value at every call.
And with Wamboo reply you'll have all elements to achieve your objective.
TestComplete has its own data generator for cases like this
https://support.smartbear.com/testcomplete/docs/testing-with/data-driven/generators/index.html