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.
- 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.
- 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.
- Once completed the recording your Jmeter should be look like this.
Delete unwanted items from list and copy/move them to your test plan.
- In your test plan, add appropriate reports for analysis, like View Result Tree, Summary report and etc.
- 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
Stupid question alert:
ReplyDeleteIs there any way to run pre-recorded jmeter tests in SharePoint with the Security Validation switched on?
If we use an HTTP Authorization Manager or something?
I have to stress-test a production server while it's in use, so don't want to only be able to test with validation turned off...
You can if you not going to post back any view state of page content. Like view/search page or download document.
ReplyDeleteThe validation check is to make sure no malicious code inject back to SharePoint apart from system itself. To simulate create a new item or upload new document you need a view state which generated by system.
Hope this does make sense to you.
Hi,
ReplyDeleteWe are testing a sharepoint 2010 (Intranet) appln using JMeter. One of the counter called 'Current Connections' using PerfMon is showing the same user load number. For e.g. if we do the load with JMeter for 10 users, you can see 10 current connections at the IIS web server.
Whereas the same test, run with VSTS show up about 2x (twice) 20 current connections at webserver using PerfMon. This is causing whether the actual load is generated at the webserver or not. Even normal IE browser shows up 2x, 3x connections at IIS webserver.
When we looked at the throughput and no. of txns generated during the load test, we could see that JMeter produces about 6-7% less than that of VSTS. What could be the reason, why this difference is seen at IIS webserver. Kindly help.
From your experience could you confirm if the 'current connections' counter at IIS is a valid measure to look at concurrenty? or do we need to be concerned that the required load is not seen because of current connections same as that of virtual users? Kindly confirm.
Hi Venkat,
ReplyDeleteMake sure the number of thread you are using is set to one, total concurrent users are number of thread multiply by user number.
This might because of these products were done in different technology platform, Java/C. I don't think is fair to compare two different architecture in term of performance.
I hope these help.
HI, Eric. I try to test Sharepoint with JMeter. I create proxy, but all my requests is empty with code 401 - unauthorized. Where Im wrong?
ReplyDeleteProxy server must have HTTP sampler setting type Java
DeleteThanks Stephan.
DeleteAlso, I have experienced that sometimes only Firefox will work for recording sharepoint. IE/Chrome both failed on my last project.
Delete