C# API Load Tester


I require a C# .NET 4.0 console application that can be set to repeatedly make requests to an API that I host and periodically store the results in an MSSQL 2005 table.


Anything in single quotes = an AppSettings key. The entire list of settings that this application will take is:

- ‘ThreadCount’: the number of threads to run

- ‘ThrottleMs’: the time each thread should wait between requests.

- ‘ApiDomain’: the domain of the API being tested.

- ‘RunForever’: when true, application will loop and never stop making requests

- ‘DbWriteInterval’: determines how frequently to dump results to DB


The console app will run ‘ThreadCount’ number of threads that will then each make a request every ‘ThrottleMs’ or as fast as is possible. For example, if ‘ThrottleMs’ = 500 but a request takes 1500ms to come back, just make a new request after the 1500ms. If a request comes back in 100ms, then sleep that thread for 400ms before requesting again.


An MSSQL table name Input_UrlApi will hold the path and query string portion of all the requests that we want made. The domain will be a setting under ‘ApiDomain’. Read the entire table into memory before beginning any requests for best performance.

It is up to you how you store the urls and how you allocate them to each thread. You could either have a single data structure that all threads hit or divy things up so each thread has a list of URLs that it owns. I have no preference.

Once all requests are made, then the application will look at a bool kept in ‘RunForever’. If true, start over from the top. Otherwise, exit.


First and foremost, DO NOT write the request results to the DB every single request. There will instead be a single DataTable that all threads write to until ‘DbWriteInterval’ is reached. At this point the DataTable will be bulk inserted into the database table named Results_Raw. Use System.Data.SqlClient.SqlBulkCopy. If all threads have to wait for the bulk insert and there is a pause in execution that is ok.

The central DataTable will have the following columns:

- Timestamp - the datetime when the request was first started

- Request_Time_Ms - the time that the request too to complete in milliseconds

- Url - the entire url requested

- Http_Status - the status code returned by the API. Ex: “200” for a successful request

- Bytes_Returned - the number of bytes in the response. You need to read the entire response into a byte[] for this purpose alone.

- Thread_Count - the number of threads currently running for this test


Each request must be signed with an HMAC style signature. I have provided a C# .NET 4.0 console application that makes an authenticated request to the API that I am hosting. Check out the app and get your requests to authenticate based on what you find there. Be sure to test my app first and make sure that it can authenticate ok from your dev environment before you get too far.


I try not to get hung up on every detail when writing a spec. I’d rather rely on your best judgement.

That being the case, once I get your work back I will almost certainly ask for something to be changed or added outside of my original spec. So plan on ~10-15% scope creep as I start to use and try out the code. Anything beyond that and he can add additional milestones or whatever works to make sure you are fairly compensated.

Beceriler: .NET, C# Programlama, SQL

Daha fazlasını gör: work as a tester, what to write on my overview, what is data structure in c, what is a data structure in c, what are the application of data structure, what are data structure, string in data structure, string find c, string data structure, sql query to get list of database, set data structure, need alone writing, named query, loop net, key data structure, how to get started with writing, how do you find an app, how can i get started writing, execution table, dev net, data structure with c, data structure set, c with data structure, c# beginning, best writing app

İşveren Hakkında:
( 5 değerlendirme ) Scottsdale, United States

Proje NO: #4414116



Hi Steve, I can do the tool you need. also can fix the prev project to insert in bulk sql.

%selectedBids___i_period_sub_7% gün içinde 370%project_currencyDetails_sign_sub_9% %project_currencyDetails_code_sub_10%
(10 Değerlendirme)

Bu iş için 6 freelancer ortalamada $406 teklif veriyor


Hello. I'm experienced in .NET, I can do this for you

in %bids___i_period_sub_35% gün içinde300%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(52 Değerlendirme)

Budget is little high. But it deserve. Please pm me if you are interested on this budget.

in %bids___i_period_sub_35% gün içinde500%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(26 Değerlendirme)

Please read my private message

in %bids___i_period_sub_35% gün içinde220%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(23 Değerlendirme)

Will work at

in %bids___i_period_sub_35% gün içinde330%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(10 Değerlendirme)

Dear Sir I went through the long/detailed description and understood the requirement. Pleas have a look in your message box. thanks and regards the grtcoder

in %bids___i_period_sub_35% gün içinde495%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(2 Değerlendirme)

REady to help with.

in %bids___i_period_sub_35% gün içinde550%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(1 Yorum)