Javascript/JSON Support in Load Tester 4.3 - Web Performance

Javascript/JSON Support in Load Tester 4.3

Over the last year, Web Performance engineers have been working to make Load Tester smarter and easier to configure.  Load Tester 4.2 introduced the new Fields View, which allows test case developers to write out HTTP requests using a flexible and composable assortment of data sources.

Starting with Load Tester 4.3, Load Tester will automatically recognize JSON content in any HTTP request.  As a consequence, each JSON element will become a configurable name-value pair field in the Fields View.  We believe this will make it much easier to configure complex AJAX and RESTful style test cases.

Some JSON content in an HTTP POST, broken down in Load Tester's fields view by hierarchy and name-value pair.

Furthermore, whenever Load Tester’s Application State Management tool runs, it will search for incoming name-value pairs that have matching outgoing name-value pairs.  This search works only for JSON numbers and strings.  When the ASM tool detects a match, it will automatically configure the test case to transmit the value it received.

The screenshot below shows such a segment of JSON content.  The ‘address_id’ and ‘address’ fields in this test case were provided by the web server in a separate response (not shown), extracted, and routed dynamically into all subsequent requests:

A screenshot of the field edit dialog, with an automatically configured customer address hilighted in blue.

For many users, this will completely automate test case development.  Some users will need to add some custom configuration to simulate complex application logic.  While other types of auto-configuration performed by Load Tester are highly reliable (so much so that we recommend that test case developers completely ignore automatically configured fields), the correctness of auto-configuration in JSON content can not in general be guaranteed.  Automatically configured JSON fields will be incorrect in a handful of situations.

Finally, there may be cases where Load Tester will not notice JSON content inside a request.  In particular, the content may be hidden inside a query parameter or form field, or the content-type header may for some reason indicate that the content is something other than JSON.  However, the user can mark any field as JSON content by using the “Parsers” tab in the field edit dialog.

Choosing a parser using the Field Edit Dialog

Add Your Comment

You must be logged in to post a comment.


Copyright © 2024 Web Performance, Inc.

A Durham web design company


(1) 919-845-7601 9AM-5PM EST

Just complete this form and we will get back to you as soon as possible with a quote. Please note: Technical support questions should be posted to our online support system.

About You
How Many Concurrent Users