SharePoint Performance Testing

Watch how to perform a load test of a file upload scenario in Microsoft SharePoint 2016 using dataset with multiple files.

Microsoft SharePoint, file upload, best practices, datasets, parameterization


In this video, I will show you how to test the performance of Microsoft SharePoint 2016. Specifically we will go over a file upload scenario. I will show you how to record a file upload action and then with a few clicks, configure your script to emulate multiple users uploading different files. This script can be used to gauge SharePoint's performance under various load levels. I begin by recording a test case. In the test wizard, I enter a test case name: "File Upload". Then I enter the URL and the first transaction name, which is Login. Start recording. I enter my credentials and navigate to Documents. From this screen, I select "Upload" and select a file on my computer. The file is uploaded, and I stop recording. StresStimulus automatically correlates dynamic variables and creates necessary parameters. Back in the test wizard, I am deleting unnecessary hosts that were targeted. Now I will "Verify" the script to check for issues. StresStimulus will replay the test case once. There is one error. Let's investigate. I double-click the error to open the comparison inspector. The recorded session is on the left, and the replayed session is on the right. All of the differences are highlighted. I switch to the Response tab, and now I can see that the error happened because StresStimulus emulated upload of a file that already exists. To fix it, we need to replace the recorded file with a different file using a dataset. I will import a CSV file that I prepared in advance. Let's call this dataset "upload file". The file name and extension are stored in separate columns. You can add as many files as you want to test. Then, I search for the first request where the recorded file name is sent and the first highlighted request is 58. I select the Parameter section, and in request 58, select the recorded file name. Right click on it to open the "variable picker", and under Dataset, Upload file, select "FileName" and "VU-iteration" databinding method. This means that during the test, every virtual user in every iteration will use a subsequent dataset record. Since the file name may be used in requests several times, we want to make sure that all of its occurrences are replaced with the same dataset. Right click and choose "Create more like this". One more parameter was created. Then I will parameterize the file extension the same way. Let's run "Verify" again to make sure that we fixed the issue. Verify completed with no errors. Back in SharePoint, I navigate to Document, and the new file was uploaded. This time the script is correct. Now we can run this test to emulate multiple concurrent users and file uploads and it will work as long as the dataset contains unique file names. With this approach, you can record and load test any scenario in Microsoft SharePoint without writing a single line of script. Thank you for watching.