This is a migrated thread and some comments may be shown as answers.

Control iteration in Test Complete v 7.2 or higher

5 Answers 110 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Long
Top achievements
Rank 1
Long asked on 27 Jul 2010, 08:33 AM
I am testing a application. I need to control the iteration by my self. If need to use code, please send me the code sample.

5 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 27 Jul 2010, 03:21 PM
Hello Long,

Looking at the title of your post it appears you're looking for assistance using Test Complete. This forum is dedicated to the use and support of our product, WebUI Test Studio. If you want to consider using our product instead, we'll be more than happy to assist you.

Greetings,
Cody
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Long
Top achievements
Rank 1
answered on 28 Jul 2010, 02:06 AM
I am so sorry. I have practiced 2 software for testing. They are WebUI and Test Complete for choose one of them for my company.
The question i want to ask is: Control iteration in WebUI.
So sorry.
Please help me.
Thank you so much
0
Cody
Telerik team
answered on 28 Jul 2010, 08:18 PM
Hi Long,

Usually when someone talks about "iteration" and automated testing, they are talking about a data driven test. Is that the case here? If not I need clarification by what "iteration" means in your question.

Before I can help further I also need to know In what way do you want to control the iteration?
  • Limit which rows from the data source are to be used?
  • Skip some data rows depending on some condition? What condition?

Please explain in detail what you mean by "iteration" and how you want to control it. Then I'll be able to assist getting that accomplished.

Sincerely yours,
Cody
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Maria
Top achievements
Rank 1
answered on 06 Aug 2010, 02:52 PM
Hi,
I have a question about iteration in data-driven tests.
Is there any possibility to get the number of current iteration? Does Test Studio use inner counter of iterations?
It needs me to control executing some of actions on the first iteration of data-driven test.
0
Cody
Telerik team
answered on 06 Aug 2010, 05:29 PM
Hello Maria,

Yes you can, in a somewhat obtuse way. It can only be done in a code behind file. The code looks like this:

[CodedStep("Coded Step")]
public void coded_step()
{
    int curRow = this.ExecutionContext.DataSource.Rows.IndexOf(this.ExecutionContext.CurrentDataRow);
}

curRow will get the value of the current iteration, starting at 0. You could then perform if... then logic based on the value.

Sincerely yours,
Cody
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Long
Top achievements
Rank 1
Answers by
Cody
Telerik team
Long
Top achievements
Rank 1
Maria
Top achievements
Rank 1
Share this question
or