AJAX and Script Customization

The Silk Performer Recorder can record and replay Web applications that utilize AJAX (Asynchronous JavaScript and XML) requests. This is possible because Silk Performer recognizes asynchronous AJAX requests and responses that arrive in the form of either XML or JSON within HTML responses. Silk Performer scripts AJAX requests that it encounters as WebPageUrl calls.

Silk Performer and TrueLog Explorer support access to values within AJAX requests. This enables script customizations such as input-data parameterization, verification, parsing, and session-information customization within AJAX responses.
Tip: The InsuranceWeb demo application, available at http://demo.borland.com/InsuranceWebExtJS/, offers the functionality to switch between JSON and XML serialization methods for testing purposes. From the Select a Service or login list, select Agent Lookup for JSON or Agent Lookup (XML) for XML.

Pretty-Format JSON and XML Data

JSON and XML are data-structure formats commonly used in AJAX applications, REST techniques, and other environments. Silk Performer supports pretty-formatted viewing of XML and JSON-formatted byte streams in BDF scripts. Enhanced rendering of JSON formatted data enables easier customization of string values via TrueLog Explorer’s string customization functions.

When JSON-formatted data is recorded or inserted into a BDF script, Silk Performer displays the raw JSON byte stream. Once displayed in JSON format, XML can easily be customized using Silk Performer’s Parameter Wizard.

Silk Performer offers the option of viewing JSON data in either pretty-formatted JSON-rendering view or as a raw JSON byte stream.

Understanding JSON

According to JSON.org (www.json.org), "JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language...” “JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language."