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 9205935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:04:25+00:00 2026-06-18T00:04:25+00:00

Using VS2010’s load test feature with recorded webtests. I have problems with cascading errors

  • 0

Using VS2010’s load test feature with recorded webtests.

I have problems with cascading errors in my recorded webtests. That is, if one request fails, several other requests will also fail. This creates a lot of clutter in the logs, since usually only the first error is relevant.

Is there a way to make a failed validation rule terminate the web test at the point of failure, and NOT run the rest of the requests?

(to be clear, I still want to continue with the load test in general, just stop that specific iteration of that specific test case)

Here is some sample code that demonstrates what I’m trying to do:

using System.ComponentModel;
using Microsoft.VisualStudio.TestTools.WebTesting;

namespace TestPlugInLibrary
{
    [DisplayName("My Validation Plugin")]
    [Description("Fails if the URL contains the string 'faq'.")]
    public class MyValidationPlugin : ValidationRule
    {
        public override void Validate(object sender, ValidationEventArgs e)
        {
            if (e.Response.ResponseUri.AbsoluteUri.Contains("faq"))
            {
                e.IsValid = false;
                // Want this to terminate the running test as well.
                // Tried throwing an exception here, but that didn't do it.
            }
            else
            {
                e.IsValid = true;
            }
        }
    }
}
  • 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-18T00:04:26+00:00Added an answer on June 18, 2026 at 12:04 am

    I found a good solution to this. There’s a blog here that details it in full, but the short version is to use e.WebTest.Stop(). This aborts the current iteration of the current test, while leaving the rest of the run intact as needed.

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

Sidebar

Related Questions

Using VS2010 i have a test that calls a method which runs a command
I'm using VS2010 I have a project with several headers and one file with
I'm using VS2010, and hitting severe performance problems. For example I can load up,
I am using VS2010 - WPF - C# I have a listview that takes
Using VS2010 on .NET v4 I have the following problems. I have created two
I am using VS2010, working on a WinForms application that uses the ReportViewer control
I'm using VS2010. The projects that I'm working on use different source control providers,
I'm using VS2010 Beta 2, I have a Complex Type called Address with the
Using VS2010, I can't seem to add additional test methods. If I set up
I'm using VS2010 Express with SP1 on XP Pro SP3. I have a web

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.