Previous Topic: Magic StringsNext Topic: Magic String Case Sensitivity


Magic String Exclusions

VSE attempts to identify tokens in identical requests and responses (contingent on specific rules), and turn the values in the response to a "magic string." The value of the magic string varies, based on the values in the request.

However, DevTest has no way of knowing if the values match by design or by accident. This match is most common for the following values:

Request

<GetUserRequest>
<userId>lisaitko</userId>
<includeDetails>true</includeDetails>
</GetUserRequest> 

Response

<GetUserResponse>
<userId>lisaitko</userId>
<isActive>true</isActive>
<isEmailVerified>true</isEmailVerified>
</GetUserResponse>

The two "true" values in the response have nothing to do with each other, or with the value in the request. In real world scenarios, the number of unwanted "magic strings" that is generated is much greater. One way to avoid this issue is to find and replace these magic strings manually after the service image is recorded.

An easier way, however, is to set the lisa.magic.string.exclusion property in lisa.properties.

This property lets you specify values that are not candidates for magic string identification. DevTest does not try to correlate these values in the response to values in the request during recording. If necessary, you can still manually edit the service image to add magic strings.