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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:26:03+00:00 2026-06-18T02:26:03+00:00

I have been asked to load test an external webservice hosted by our client.

  • 0

I have been asked to load test an external webservice hosted by our client.

Basically to send multiple web requests to the service and time how long it takes for the service to process them all. To try and simulate multiple different users hitting the web service from different machines. The test will be to check that the webservice can handle this an to basically give the client some metrics and examples….e.g how long its takes 50 requests to respond.

I am aware that this could be achieved by using a tool like SoapUI/LoadUI.

What I want to know is there anyway I can write a load test using C#?

Currently I have something along the lines of the following:

    [Test]
    public void TestService50Requests()
    {
        List<WebRequest> requests = CreateMultipleRequests(50); //Creates web request objects

        string timeSpan = TimeMultipleRequests(requests);

        Console.WriteLine("50 Requests runtime: " + timeSpan);
    }

    private void TimeMultipleRequests(List<WebRequest> requests)
    {
       var stopWatch = new Stopwatch();
       stopWatch.Start();

       foreach (var request in requests)
       {
            request.GetResponse();
       } 

       stopWatch.Stop();
       var timeSpan = stopWatch.Elapsed;
       return String.Format("{0:00} hours, {1:00} minutes, {2:00} seconds, {3:00} milliseconds", timeSpan.Hours, timeSpan.Minutes, timeSpan.Seconds, timeSpan.Milliseconds / 10);           
    }

I assume there is a better way to do this? Any suggestions for improvements or is this completely wrong?

  • 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-18T02:26:04+00:00Added an answer on June 18, 2026 at 2:26 am

    It really depends on what you are trying to test. Load testing can be used to stress (how many concurrent users it takes to break the system) or soak (medium load for an extended time period) the system. Your code does not send any concurrent requests to the system so it cannot be considered a good test that would mimic the real behavior of users.

    There are good tools to accomplish these, but they can be costly. If you have Visual Studio Ultimate at your disposal, the load testing tools included are pretty good. You can also look at WAPT, which is a tool that will do a similar thing.

    So, I would go back to the person that gave you the requirement and ask what specifically needs to be tested. Is it number of concurrent users the system can handle, no memory leaks, system availability, or performance?

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

Sidebar

Related Questions

I have been asked to check how to load test a flex application. I've
I have been asked by my supervisor to develop a web application using either
I have been asked to get details of every user that logs into our
I have been asked by my client's SEO agency to perform a 302 redirect
I have been asked to create some functionality in which marketing team send users
I have been asked to implement some email address validation on a web app
I have been asked by my professor at university to demonstrate how load balancing
I have been asked to improve the memory efficiency of an application that is
I have been asked to write a script that pulls the latest code from
We have been asked to increase the performance of a clients site search. Before

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.