Thursday 30 December 2010

Jmeter Stress/Load Testing for SharePoint 2007 and 2010

What I want to share today is the free Java tool which can use for functional or non-functional testing on SharePoint application. The Jmeter is very powerful Java  load test tool for web application or SharePoint, it is free and easy to use. Although it is Java based but it work perfectly fine on ASP .Net application with JavaScript, in this case the SharePoint 2007 or 2010.
Here the features list from offcial website.
  • Can load and performance test many different server types:
    • Web - HTTP, HTTPS
    • SOAP
    • Database via JDBC
    • LDAP
    • JMS
    • Mail - POP3(S) and IMAP(S)
  • Complete portability and 100% Java purity.
  • Full multithreading framework allows concurrent sampling by many threads and simultaneous sampling of different functions by seperate thread groups.
  • Careful GUI design allows faster operation and more precise timings.
  • Caching and offline analysis/replaying of test results.
  • Highly Extensible:
    • Pluggable Samplers allow unlimited testing capabilities.
    • Several load statistics may be choosen with pluggable timers.
    • Data analysis and visualization plugins allow great extendibility as well as personalization.
    • Functions can be used to provide dynamic input to a test or provide data manipulation.
    • Scriptable Samplers (BeanShell is fully supported; and there is a sampler which supports BSF-compatible languages)
So, what you can do with SharePoint using JMeter?
  • Stress test SharePoint farm or standalone topology.
  • Record and analysis the response time  of SharePoint tasks, such as file upload, create a new item, read page, search and etc.
  • Test the SharePoint's web services.
Some of you may say creating those scripts are very hassle and may take very long time to do so, but luckily the Jmeter does support http traffic  recording which can track the activities on Internet browser and replay them in future. Here the how-do-I recording file upload activities on SharePoint 2007.
  1. Record the browser traffic events  in Jmeter by registering  a HTTP proxy server and recording controller in WorkBench, events captured can be re-used for repetitive testing.
  1. Click “Start” on HTTP Proxy server and then go back to browser to upload or create a new list item on SharePoint, if Jmeter does not recording the events then change the browser to use 127.0.0.1 in connection proxy.
You might have this certificate error, but that is normal due to Jmeter issued a temporary certificate when using a proxy.
  1. Once completed the recording your Jmeter should be look like this.
Delete unwanted items from list and copy/move them to your test plan.
  1. In your test plan, add appropriate reports for analysis, like View Result Tree, Summary report and etc.
  1. Before run any recorded test, make sure you have Security validation check switch off in Web Application -> General Settings under Central Administration. Otherwise it will caused test failed to run.
SP2007
SP 2010

Tuesday 28 December 2010

Enable the Item Count for SharePoint 2010 Search Refiner

In SharePoint 2010 you can modify the search refiner's xml text to show count on each category, the links listed at below which show you step-by-step for configure the refiner webpart.


But one thing have to bear in mind the SharePoint 2010 item count does not same as Fast Search for SharePoint's deep refiner, the SharePoint item count will shown only 50 items by default and hard limit to 500 items. What this mean is the item count will not go beyond  limit even if search results have more than 500, the system only update counting when user select next page or next result set.

As told by relevant personnel who work in Microsoft, it is because of SharePoint search index not same as Fast Search advance index algorithm.