To run things, clone the repo locally, and run npm install in the root.
- open https://solutionstest.esri.com/api-load-test/browser/ in a browser
- enter username, password and portal base url (optionally click Verify Credentials to ensure no typos)
- Click "Choose Files" and select a large number of files. If you've cloned the repo, use the files in the
small-resourcesfolder. - Click Start Test. You'll see messages in the Output area
If you want to run this locally, you have to open the /browse/index.html file in a browser.
- copy
.env-exampleto.env - Put real credientials in the file, and optionally change url to point to a different portal instance
- drop lots of files into the
/resourcesfolder. All these will be uploaded. Make sure their extensions are valid for item resources. - run script via
node index <concurrency> <lag>i.e.node index 5
This will do the following:
- create a "host" item that we will upload resources to
- read the files in
/resourcesas fast as possible and immediately fire off promises to upload the files usingaddItemResourcefrom REST-JS - once all those promises are resolved we then ask the item for it's resources, and check that each file we sent up, is listed
NOTE: this does not currently fetch the resource and verify that it's bit-wise the exact same as what was sent up.