Showing posts with label Visual Studio Team System. Show all posts
Showing posts with label Visual Studio Team System. Show all posts

Wednesday, October 1, 2008

Random page selection for Load Testing

How should I design a load test for a scenario where a user can randomly hit one page from a given set of unsecure pages maintained on my web server? So at any point of time there could be 'x' no. of users, each accessing one page from the 'y' no. of pages residing on my web server. First I wrote a web test that will simulate 1 user accessing a random page. To do this, I created a table named a single column table named "Files" and populated it with the names of the aspx pages I have on the web server. Then I created a view over it with a SQL query

SELECT TOP(1) 'http://localhost/' + [dbo].[Files].[FileName] AS [PageName] FROM [dbo].[Files] ORDER BY NEWID()

Thanks to Philipe for giving this tip!

The above query will return a random page Url like http://localhost/Page1.aspx which is bound to a request in the WebTest.
Then I associated this WebTest with the LoadTest and configured the LoadTest to start with 1 user and add a new user every 1 second till a maximum count which will be equal to the number of pages on my web server. By selecting a distribution model based on the number of virtual users, I expected that the load test will result in user's getting a random unique page in each iteration. However, I was baffled to see what the load test engine was actually doing. On running the load test, the Page Results section in the Summary showed me that only one page was requested during the entire execution!!! On further investigation, I noticed that the WebLoadTestRequestMap table in the Load Test Database had only 1 RequestUri corresponding to my LoadTestRunId.

To get over this issue, I found it best to execute the above SQL statement using SqlDataReader in the WebTest code and create a WebTestRequest instance with the Url returned. With this approach, I am now able to successfully load test the scenario I had in mind. :)

Sunday, January 13, 2008

Controlling form layout for TFS Work Items

Here is a very good post on the following undocumented attributes in TFS for controlling work item form layouts
1. Name
2. MinimumSize
3. NumberFormat
4. MaxLength
5. Format

Wednesday, January 2, 2008

Deleting build history in TFS

If we delete the builds from Build Explorer, the same is not reflected in the drop down list of of the Bug work item. Benjamin shows us how to delete build history from TFS in this article.

Wednesday, September 12, 2007

How to: Undo an orphan checkout in VSTS

Recently, I replaced my old laptop with a new one. When I recreated the VSTS folder structure on the new laptop, I realized that I had forgotten to check-in a few files which I had checked out on my old laptop. How do I undo the checkout? That was the question bothering me… The solution, it turns out, is pretty straightforward.

Delete the workspace by using the command below

tf workspace /delete workspacename;username /server:servername

You will see the message below

A deleted workspace cannot be recovered.
Workspace 'workspacename;username' on server 'servername' has n pending change(s).
Are you sure you want to delete the workspace? (Yes/No)

Confirm the action and the problem is fixed!

What is success?

The journey of life takes us through varied experiences like landing an admission at a prestigious college, earning a degree, getting hired,...