- Subscribe to RSS Feed
- Bookmark
- Subscribe
- Email to a Friend
- Printer Friendly Page
- Report Inappropriate Content
|
Use the following code replacing a version number in a message as an example of string replacement using SOASTA CloudTest > Scripts. This script example represents the output of a recorded clip for HTTP traffic. These messages have strings in them that contain the SOASTA CloudTest build version number. In order to make the clips portable across versions, it is necessary to either replace the version with a generic version string ("version") or the real new version number. Note: Use the following links to download and import the XML for the entire Replace Version Number Composition or just the Replace Version Number Script. XML can be imported using the SOASTA CloudTest > Repository toolbar > Import icon or copy and paste only the script code from here. Refer to Script to learn how to add a script to a test clip and test composition. |
|
|
var |
|
var version= "version"; |
|
var clipElements = $context.currentClip.children; |
|
var clipElement = clipElements[i]; |
Note: If there was something in the message text that was replaced (causing |
var = clipElement.getMessage(clipElement.MESSAGE_HTTP_BO
|

