Running the same test case in Test Complete Multiple Times
I have a couple of test cases that I am generating for a Website and I need to set up several of the cases so that they will run multiple times during my testing of the product. I want be able to add to 20 new records and then update them as we are going.
I was looking through this information and it looked like the system wanted me to go out to a database or csv file. In this case I am entering the same data over and over again and there is no place where this information is stored other than the environment that I am working with.
Well, you are going to have to store it somewhere so TestComplete knows what the data is.
Another option would be to use a table variable and store the data that way. Then you can use a while loop to iterate through the data.
What I am doing is creating the data in a development environment website. I do not have access to the data in a database other than if I am selecting the data from the user interface. I can create multiple items with the same name as the data will be deleted in time. There are multiple testers on our systems who can lock up a record what I want to do is set up a test where I create 10 or 20 records and then randomly select one to update, clone or do other things to the data. I do not store the data as that is done by our development environment.
I am entering one set of data only once and entering the various fields within the environment. Then I select Create and the system automatically generates the data within the environment. What I want do is be able to have the same data 10 or 20 times.
I don't need to change the data each time I create new information. I will be looking at creating a script to do that later but all I want right now is to be able to enter one set of data multiple times.
You can use a csv or Excel file and only have one data line in it for now and use the data driven test with a For loop inside it to count the new records. This has the advantages of 1) letting you edit the data outside the test so you don't have touch the code 2) being scalable, so later on you could have different versions of the data easily, again without changing the code. In your example, it would create 10 (or 20) records for each line in the file.
You can create variables to hold that data and use a For loop to go through the data entry using the variables. If you ever want to change the data, you will have to edit the variables. If you ever want to have multiple sets of data, you will have to add more variables and change your code.
> I want right now is to be able to enter one set of data multiple times.
Isn't the Count column of the Execution Plan is what you are looking for?
/Alex [Community Champion]
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
I did get the system to a point where it was creating the same item multiple times. This maybe off base for this question I managed to create the dataloop but with the csv you suggested however, I have multiple required textnodes and panels with data names in them. My csv has 100 pieces of test data with the in it is there away that needs to be setup for the script to recognize those panels that need to be filled with the data from the csv.
Below is an example of the csv with the title of the item:
|Source||Deal Name||Banker||LPA/Credit Analyst||Department||Deal Comments|
|SXXXX||Bugs Bunny||Benne Rollins||Whitney Robers||Accounting||New Deals Starting up|
textnode13 Click ... Clicks the 'textnode13' control.
panelAnIndividualName2 Click ... Clicks the 'panelAnIndividualName2' control.
panel31 Click ... Clicks the 'panel31' control.
panel272 Click ... Clicks the 'panel272' control.
Or is there away to make it so my script is set up to receive the random data from the csv in the Source Textnode, Deal Name Textnode, LPA/Credit Analyst Text node, Deparment Text Node and then Deal Comments.
The text nodes all have the panel information in them.