All about the Strategy, Design, Customisation, Deployment and Development of SharePoint and its related Technologies

  Administration   All Me!! Baby!!   BDC   Book Review   Business   CKS   Conferences   CQWP   Development   Duffer Moments   Email   Errors   Family   Fixes   General   Groove   How To   How To Code   InfoPath   iPhone   IRM   Longhorn   Lotus Notes   Migration   Mobility   Office System 2007   Personal Projects   Powershell   Records Management   Search Server   Security   SharePoint   SharePoint 2010   Silverlight   SQL   Tech Ed 2008   Testing   Vista   VSTO   WSS   XSL

[14/04/2008] MOSS2007 – Visual Studio 2008 Testing (Load Test)
 
Categories: Development, Office System 2007, SharePoint, Testing
 

Hi again, in the last post we looked at testing the search functionality within SharePoint 2007 by using Visual Studio 2008 Team Suite Edition or you could use the testing edition. In this post we will look at creating a load test for the SharePoint Server that will simply have a batch of users access the homepage and then perform the search as we outlined it in the last post. So begin with as before we have our testing solution and we also have our testing project, to this project we are going to add the following:

This template will load the following wizard:

The first step in creating a load test is to give it a name:

You will also notice the following options:

The "think time profile" section is used to add a delay between each unit test. In the scenario of dong unit tests this is very useful. For our demonstration we will leave it set to the option shown above. The next option allows us to set the load of the test, such as the amount of users.

If you take a closer look at the options here we can set either a constant load that would mimic a concurrency of 100% or change it to a staged approach where we can have a certain amount of users for so long then some more with a maximum load that we define. For the demonstration we will look at using the standard "Constant Load" and set this to 25 users.

Once you have selected the amount of users there are various types of load we can apply to the server. There are three options:

For our test we will use the first option. Once you have selected the test now we need to select the actual defined tests that we created earlier on.

Press the "Add" button and then select the following tests:

We could add more at this point but for our test this will do. In one of the following posts I will create a larger load test project which will include some of the tests you can see above. When the tests are loaded we can then set the priority of the tests, in the picture below, I have set them to 50% each but could if needed change this based on what kind of testing was needed and what work the user base would be doing daily.

Next we are able to set the browser type that we can use, in our example we will use Internet Explorer 7, but it could be any from the list below.

Now we get to select what bandwidth we wish to use, this is great as this will tailor the test and the results to which ever latency we set.

Last but not least we need to set the duration of the test. On this screen we are able to either set duration or set test iteration instead.

For our test I have left it as"load test duration" and then set it to five minutes only.

Just like creating a normal web test upon completion you sent back to Visual Studio 2008 and presented with a very similar layout to a recorded web test.

As part of this wizard the system will work out which test and performance counters should be monitored. If we expand the list of counter sets you can see the following:

I will not go through each of these as there are quite a few, suffice to say it picks up all the key ones such as memory, CPU, page access and even down to disk read access. Now that we have a project ready and built we can simply run it. When it initially starts the screen will look something like below:

In my test the following happened, which I was assuming would happen. This is mainly as I am running everything on a single VM. The status bar here not only lists the status of the load test but also any errors and threshold violations.

Each of the links above can be clicked which will then show the actual details of the errors.

In this demonstration we are not too concerned about the errors as it is a demo. If we leave the test to run for a while the following should start to happen:

You will notice that the graphs begin to populate and that the colour chart at the bottom starts to populate with test result data.

Once the test is completed the following will appear on the left showing a small synopsis of the whole test.

As you can see a test performed within Visual Studio for SharePoint 2007 returned a wealth of information that can be used to see how the system is performing.

 
1 Comment
 

Comments

Friday, 13 Jun 2008 05:20 by Jon Scriven
Hi Liam, I was wondering if there was a way to download this tool? It looks really handy and I need to do some Sharepoint load testing but don't use Visual Studio (or have much time!) Jon

Name:

URL:

Email:

Comments: