I have (after quite a bit of work) a web test that uploads a file to my SharePoint document library using the file that is included in the test, and a DeploymentItem that identifies this file so that it can be used when uploading the post file.
This works fine, now ignoring the SharePoint factor for a moment, the image I want to run a web test as part of the loadtest. This means that the file upload test should run quite a few times. Itβs not so great if I upload the same file to the same file name all the time.
What I want to do is create a random file in the target using the same file data. for example, I want the file to be downloaded in order to have the file name "image1" + Guid.NewGuid.ToString () + ".jpg".
Besides creating a new file on disk with this name and adding a deployment item or something to find the file every time, I donβt understand how to do it. This is especially a problem, since the web test will run through the test agent on a machine on which I really cannot create such code.
In the worst case, I will go with deleting the file after downloading it.
Any ideas on how I can do this?
source
share