You can use the same files across multiple tests by uploading those files to Shared Folders, then including those folders in as many tests as you would like. Shared Folders provide a more advanced alternative to simply uploading files to each test, and folder contents are included in an "all or nothing" manner.
You select which folders to include (rather than individual files), which are then downloaded to each of the engines in your test before it starts.
Note: JDBC drivers are an exception to this rule. These must be uploaded directly to the test, as shared folders do not currently support driver uploads.
With power, comes responsibility
This approach gives you great power: you can update a large number of tests instantly by updating the contents of a single Shared Folder. Always consider that any change you make will impact every test that includes that folder, not just the test you are currently configuring.
- Creating Shared Folders
- Referencing Shared Folders in Your Script
- Removing a Shared Folder from a Test
- Deleting a Shared Folder
Creating Shared Folders
There are two methods for creating shared folders. Both methods achieve the same result, so use the method that's most convenient for you.Create folders from within a test:
- After creating a new Performance Test, click the "Shared Folder" link in the "Upload Script" section:
- Either click the "+" button to create a new shared folder or click the box by an existing shared folder to select it.
Note: You can click the ">" arrow between the check box and shared folder name to expand its view and see its contents. - While in the Shared Folders window, you can upload new files to a shared folder by clicking the cloud upload icon to the right of the trash bin icon.
- Click the Accept button when done. Any files in that shared folder will now appear in the test. Note that the name of the shared folder will appear under the Shared Folder column.
Note: Once you've created a shared folder, it will be available to use with any test, not just the test you created it for.
Create folders from the Workspace menu:
- Navigate to Settings --> Workspace --> Shared Folders.
- Click the "+" button to create a new shared folder.
Referencing Shared Folders in Your Script
To point to a file from an included Shared Folder in your script, simply use the "folder/filename" style path: folder1/file11.csv (no leading slash). See example below.
Removing a Shared Folder from a Test
- Once a shared folder has been added to a test, a Shared Folders button will appear when you hover your mouse over the "+" button, to the right of the Scenario Definition section. This reopens the Shared Folders window.
- Uncheck the folders you want to remove from the test, then click the Accept button.
Deleting a Shared Folder
CAUTION! This procedure deletes the folder and its contents from all tests that include this folder.
There are two ways to delete a shared folder.
You can delete from a test configuration menu:
- Open the Shared Folders window, as done previously.
- Click the trash bin icon to the right of the folder name to delete it (and all of its contents).
You can delete it from the Workspace menu:
- Navigate to Settings --> Workspace --> Shared Folders.
- Click the trash bin icon to the right of the shared folder.
BOTH methods achieve the SAME result, so heed the warning above first!
0 Comments