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

Test flow control within coded steps

3 Answers 71 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Mike
Top achievements
Rank 1
Mike asked on 18 Oct 2010, 09:38 PM
I was wondering if there was a programmatic way to affect the current step position within a running test.  The specific situation I am encountering is as follows:

In our application if it encounters timing issues sometimes it will kick you to an error screen.  I do not want this to error out the test run; I want it to loop to the first step and basically reset for this particular record starting over.

Also, I would like the ability after inspecting and finding invalid data values within bound data to be able to log a custom error message, mark this current record as failed, skip to the end (or beginning depending on how this would be implemented) and begin again with the next record in the data source.

Any pointers to specific objects or methods would be much appreciated.

3 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 25 Oct 2010, 06:54 PM
Hi Mike,

Let me talk about the latter part, your question regarding a data driven test.

As currently implemented, the default action when any sort of verification test step fails (really whenever any exception is thrown by any test step) is to abort the test right there at that step, but to start again at step 1 with the next iteration of data. Thus if you have 100 rows of data in your data source you will get 100 runs of your test always, each with a pass/fail indication.

Your first request, restart the test given a specific error screen, this one is much more difficult. First we haven't implemented any sort of GoTo functionality. Once a test starts it is simply going to march forward. Also, how would you detect this error screen that is the result of a timing issue? Can this screen appear at any time during the test? Or only at a specific step?

If you don't mind working in code we may be able to come up with something.

Also be aware that in our upcoming Q3 release we have implemented an If-Then-Else logic feature in the test steps.

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
Mike
Top achievements
Rank 1
answered on 25 Oct 2010, 07:54 PM
Controlling the current test step through code was actually the route I was looking at going.  Is there a property or method in the CurrentTest object to move to or otherwise set the current step?
0
Cody
Telerik team
answered on 25 Oct 2010, 08:12 PM
Hi Mike,

Unfortunately no, currently there is no property or method you can call to change the current step number to execute. I've logged a feature request for this.

When I said "If you don't mind working in code..." I meant pretty much everything would have to be done 100% in code, i.e. the test and the looping... as in just a single coded step. If we stay in code and don't think about test steps, then it could be done but will take a bit of work to get there.

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
Mike
Top achievements
Rank 1
Answers by
Cody
Telerik team
Mike
Top achievements
Rank 1
Share this question
or