Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7914217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:02:30+00:00 2026-06-03T14:02:30+00:00

I have some difficulties understanding how the access method Do not move cursor automatically

  • 0

I have some difficulties understanding how the access method “Do not move cursor automatically” works for a web test data source. And the documentation out there seems to be far from exhaustive.

First of all, let’s assume there is a simple web test with only one request. It uses a data source called DS with a table called StepList, that contains 5 rows.

The Access Method for the table is set to “Do not move cursor automatically” and the current test settings have “One run per data source row” enabled in the web test properties. The web test is not part of a load test.

In these conditions, the test is run 5 times, for each row, so it basically moves the cursor automatically. Is this intended?

Now, on to the practical question, which is the subject of this post.

My StepList table above has, among others, an identity column and a StepId column. The web test in question is actually called from another web test, and it’s supposed to run only for the table rows that have a StepId set in the test context.

Id  StepId
1   1
2   1
3   2
4   2
5   2

In order to achieve this, I followed the guidelines from here and wrote a web test plugin with the PreWebTest method looking like this:

public override void PreWebTest(object sender, PreWebTestEventArgs e)
{
    string stepId = string.Empty;

    if (e.WebTest.Context.ContainsKey(ContextParameterName))
    {
        stepId = e.WebTest.Context[ContextParameterName].ToString();
    }

    while (e.WebTest.Context["DS.StepList.StepId"].ToString() != stepId)
    {
        e.WebTest.MoveDataTableCursor("DS", "StepList");
    }
}

The code above seems to work properly on the example table only if the stepId has the value “2”. If it’s “1”, then MoveDataTableCursor throws WebTestEndOfDataException exception: “No more rows of data in a data source table with AccessMethod Unique”.

I tried catching the exception and stopping the web test, but this doesn’t work, as the test seems to never end.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T14:02:35+00:00Added an answer on June 3, 2026 at 2:02 pm

    To answer your first question: the setting “Do not move cursor automatically” applies to runs within a load test only, which is why the cursor still moves automatically during a web test where you are using the setting “One run per data source row”. Of course, the latter setting applies to web test runs only.

    The reason you are getting the WebTestEndOfDataException is:

    1. The way “One run per data source row” is implemented by the Visual Studio test engine includes the fact that there is only one data cursor for all five tests; i.e. the state of the cursor is remembered between all 5 tests.
    2. Each test iteration automatically increments the data cursor by itself.
    3. Your plugin advances the data cursor within this set of 5 tests, necessarily exhausting the available rows before the 5 tests have completed.

    The simplest way to make your test work is to manually set the number of iterations instead of using “One run per data source row”. For example, there are only two valid rows in your data, so set the iterations to 2. However, this is also a bad solution because you would have to manually count rows and change the value.

    The next best way is to change your WebTestPlugin such that all it does is check the value of DS.StepList.StepId and do WebTest.Stop() if it doesn’t match the desired value. This way, the unwanted iterations will terminate immediately. However, they will still waste time and add visual clutter.

    If the parent test should always run, and it is only the called test that should be skipped, then wrap the “Call to WebTest” in a “String Comparison” Conditional Rule that checks the value of DS.StepList.StepId against the stepId context parameter, thus only calling the child test when the StepId is correct.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some difficulties for using Ruby block, passing in a method. As in
I am new to WCF and I have some difficulties understanding certain things... I
i have some understanding difficulties. i have some checkboxes in html like this: <input
I have some difficulties to set up the correct configuration relative to sendAsynchronousRequest:queue:completionHandler: method
I have some difficulties understanding how Boost.MultiIndex is implemented. Lets say I have the
I have some difficulties in understanding if-then-else conditionals in regular expressions. After reading If-Then-Else
I have some difficulties in understanding a function Win32_AllocatedResource() and its fields antecedent and
I'm working with gcc 4.4.5, and have some difficulties in understanding the right shift
I have some difficulties in my project. I got the RGB values from a
I'm having some difficulties with Ajax.BeginForm I have something like this in a view

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.