Forum Discussion
Hi,
Data Generator Wizard is not accessible in Scripts, It can only be used in the GUI going to Test > Generate Data...
Instead of creating each time new entry, Manually create a Project variable with Email and Name. Use that for your testing.
You can see the below link in-order to get random number to select the Project variable row https://support.smartbear.com/viewarticle/54645/
- RichBopp7 years agoContributor
Shankar,
Thank you for responding - but as I said, I'm creating a KeyWord test not Script.
Do you know of a solution that I could use in KeyWord?
Rich Bopp
- NisHera7 years agoValued Contributor
I think best solution would be first (before running any tests.... ) generate what you need data using data generator and store in a table or excel. then in your keyword data driven testing use those data.
in this case you have to plan how many record you are going run. random generation of data would be difficult if not impossible with KDT only without scripting.
- RichBopp7 years agoContributor
NisHera,
Thank you for responding, and offering your thoughts. I'm not creating a data driven test however. I'm creating a single run (if it passes, of course) regression test of our Create Contact function.
As all contacts are unique (I can not create duplicates) - I need to create a new one each time I run the script.
I'm finding it very odd that TestComplete has a data generator option that will create a single random email and a single random name one time - when creating a random each time a script is run is much more useful.
Right now it seems my best option is:
A - Use the data generator to build a large file - Save it to a table or excel.
B - Then - Every time I want to run the script - Update the entries in the script.
C - Delete those entries I'm about to use from the file.
D - Run the test.
That's a lot of manual manipulation to remember - even with comments.
I'm wondering if it is possible to create a data driven script - that will run once - and will delete the last entry from its source file?
That might get around this restriction.
Rich
Related Content
- 2 years agovericomms
- 2 years agoTauras
- 12 months agosinis
- 3 years agogeneticmaterial
Recent Discussions
- 2 days agoGane195