Scopes

Every item has scope. Setting an item’s scope as restrictively as possible allows CloudTest to make memory optimizations during runtime by throwing away unnecessary information. Targets are a special case, they can only be public or local; they cannot be private, because Targets need to be accessed by the Messages or Browser Actions in the Test Clip. Scope for the targets in a test clip can be viewed and set in the Included Targets list of the Clip Editor.



For example, if a message is “private”, then its response will not be accessed by another item in the composition, and CloudTest can throw away the response as soon as it's received. Therefore, for efficiency, the scope should be set to “private” whenever possible, and set to “local” or “public” only as an exception. For this reason, all objects are “private” by default (except for targets, which are local by default since they can’t be private).

Scopes are part of recent CloudTest improvements that include a variety of memory optimizations. For example, automatic truncation of a Message response if it is known to not be needed, release of out-of-scope responses, and the ability to create and release request data as it comes in or goes out of scope.