Test flow control within coded steps

4 posts, 0 answers
  1. Mike
    Mike avatar
    6 posts
    Member since:
    Jul 2010

    Posted 18 Oct 2010 Link to this post

    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.
  2. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 25 Oct 2010 Link to this post

    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
  3. Mike
    Mike avatar
    6 posts
    Member since:
    Jul 2010

    Posted 25 Oct 2010 Link to this post

    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?
  4. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 25 Oct 2010 Link to this post

    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
Back to Top