Wednesday, October 1, 2008
Random page selection for Load Testing
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
1. Name
2. MinimumSize
3. NumberFormat
4. MaxLength
5. Format
Wednesday, January 2, 2008
Deleting build history in TFS
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,...
-
Recently after a domain password change, I got the following error in trying to run the webrole. Can not log on locally to WebRole as us...
-
In trying to setup a site on a Windows 2008 server, I ran into the following error message Handler "PageHandlerFactory-Integrated"...
-
I was trying my hands at creating a .NET 2.0 component that can be consumed by a COM application. One of the errors I got in the process of...