Search code examples
visual-studioload-testingweb-testing

VS Load testing: delete file test case


I am testing my share point site by uploading/downloading/deleting files using webtest in Visual Studio Ulitmate.

The upload and download file test cases are working as expected. But the delete file test cases are not working and getting test case failed error.

Even I tried upload and delete file in same test cases also, but this test case also failed.

Kindly assist how to perform delete file test case in VS Load test.

Regards, David.


Solution

  • Load testing is all about replaying the same scenario multiple times. Note the difference between file upload, download and delete test cases. You can upload a file and download the same file multiple times. However you cannot just delete the same file multiple times.

    The problem with the delete test case is likely caused by your script trying to delete the same file multiple times which is causing a SharePoint error.

    If this is the case, to fix your script you need to correlate the identifier of the file you're trying to delete.

    Currently the request that triggers file delete transaction, contains a constant identifier of the file that you deleted during recording. You need to replace it with an extractor of the file identifier which you will delete during the test execution. For example, if you record a test scenario where you delete the top file on the webpage list, you need to create an extractor from this webpage's response that retrieves the top file identifier. Then use it in the subsequent request that deletes the file.

    It looks like Visual Studio did not auto-correlate this test case, so you have to do it manually.

    Keep in mind that the "identifier" here can be more than just a single id. It depends on your SharePoint version and some configuration settings.

    If you cannot figure out how to find a file identifier in the response, or how to extract it, here's a hint: our load testing tool StresStimulus auto correlates SharePoint. Download it, record the delete file test case and examine the parameter used in file-delete request and what extractor it uses.

    After that recreate them in VS.