IntroductionThis guide helps SharePoint Farm admins to use the Load Generation Tool. It describes how to write and execute these Load tests:
It also tells Farm admins how to:
Technical & System RequirementsLoad Generation Tool Visual Studio Template can be installed forVisual Studio 2013 Ultimate and Visual Studio 2015 Enterpriseeditions. The tool can be used to test load for SharePoint Server 2013 and SharePoint Server 2016 farms. Before You Read This DocumentFamiliarize yourself with the Load Testing feature of Visual Studio. Initialization StepsBefore running any test cases, initialization steps need to be performed:
Create Visual Studio load test project and configure settingsa. Create new Visual Studio project based on SharePoint Load Test template. i. If you want to use existing active directory users to test your SharePoint farm, choose windows Authentication; if you want to use synthetic users to test your SharePoint farm, choose Forms Authentication.
ii. After you choose one of the Authentication Mode, Click Next. iii. (Forms base authentication only) Specify how many synthetic users you want to create for testing and type thecommon password for those synthetic users. By default the password is “P@ssword!” (No quotes). iv. Click “Next”,
v. Click “Finish”, it will launch two windows to set up Local.testsettings and Remote.testsettings, since you have specified the controller server in previous step, just click close to dismiss the two windows.
Local.testsettings
Remote.testsettings vi. (Windows authentication only) Open users.csv file, follow the format of this file to fill your existing active directory account, for example: Domain1\John,John,123456 Domain1\Tom,Tom,123456 vii. Set either of the test setting files (local.testsettings or remote.testsettings ) as the Active Load and Web setting by right clicking the local.testsettings or remote.testsettings file and choosing the Active Load and Web Settings menu option as shown below. Provision synthetic users on SharePoint farmIf you choose the Forms Authentication, you need to follow the below steps to provision synthetic users.a. Find corresponding LoadGenerationSharePointSolution.wsp from the project (For SharePoint 2013, it is under directory wsp\15; For SharePoint 2016, it is under directory wsp\16) and put the LoadGenerationSharePointSolution.wsp to one of the servers in SharePoint Farm. For example: C:\Solutions\LoadGenerationSharePointSolution.wsp. b. Open SharePoint Management Command and run the following commands: Add-SPSolution -LiteralPath C:\Solutions\LoadGenerationSharePointSolution.wsp Install-SPSolution -Identity LoadGenerationSharePointSolution.wsp –GACDeployment c. Open new SharePoint Management Command: cd "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\<15 or 16>\LoadGeneration"(for SharePoint 2013, it is 15, for SharePoint 2016, it is 16) .\Initialize-SPFarmLoadTest.ps1 -url "http://<your-host>" -count 200 Where count parameter indicates number of synthetic users to be created. Execute the load testsYour load test project needs to be built before you can run the load test. To run one load test against your farm, open the load test and click on the Run button (the leftmost button on the toolbar) as in the picture below. In this Beta release, we have 3 out of box scenarios: CSOMListRW, MySiteRW and MySiteHostRW.
What those load tests doing?CSOMListRW.loadtestThis load test contains two coded web tests: CSOMAddListCoded and CSOMDeleteListCoded. CSOMAddListCoded: Add a document library list to personal site, you can find it in site content page:http://frontendserver:11207/my/personal/loadtestuser1/_layouts/15/viewlsts.aspx. The list name looks like CSOM_15195bb3-40ed-4795-be34-864665d6a1c7. CSOMDeleteListCoded: Delete a document library list whose title starts with “CSOM_” from personal site, if there is none, just bypass the delete document request. MySiteHostRW.loadtestThis load test contains two coded web tests: GetActivityFeedCoded and EditProfileCoded. GetActivityFeedCoded: Get ActivityFeed.aspx page. EditProfileCoded: Edit “About me” in EditProfile.aspx page, it will be changed to “Test by Load Generation Tool attimestamp”. MySiteRW.loadtestThis load test contains two coded web tests: GetMySiteCoded and AddDocumentCode. GetMySiteCoded: Get All Documents page. AddDocumentCoded: Add a document to document library of personal site. Reading your ResultsThe following tables contain general guidelines when it comes to key performance counters you get out of running load tests. CPU
Memory
Disk
Network
ASP.NET
MOSS WFE
Clean up StepsFollow these steps to restore your farm to the state prior to provisioning synthetic users and contents:
Troubleshooting
Howhave the aboveload tests been picked?We have chosen the most frequently used scenarios as per SharePoint online data in Microsoft and recommended them for broad usage and also as a reference.
|