Concepts
The base concept of XLT explained including but not limited to the action model
When testing web applications, you simulate realistic user journeys—such as browsing products, adding items to a cart, and checking out. Each journey consists of a sequence of user interactions that move a user from one page or application state to the next.
XLT structures test execution around a three-level architectural model: Transactions, Actions, and Requests.
To simulate realistic user behavior, XLT treats every virtual user as an isolated client with its own cookie jar, cache, and HTTP connection state. Connections are not pooled across users, ensuring that network and transport layers experience authentic load.
Architectural Levels
Transaction
A transaction represents a complete end-to-end execution of a test scenario (for example, logging in, searching for a product, and completing checkout). In code, a transaction is implemented as a JUnit test case that executes an ordered sequence of actions.
Action
An action represents a single user interaction that triggers a state change or page transition (such as submitting a form or clicking a link). Each action:
- Validates prerequisites on the current page (
preValidate()). - Interacts with the page or API (
execute()). - Validates the resulting page or response (
postValidate()).
The resulting page becomes the context for the subsequent action. Actions also serve as the primary measurement unit for response times and throughput metrics.
Request
A request is an underlying HTTP call (such as the initial HTML document, images, CSS, JavaScript, or AJAX calls). When using the action model or WebDriver, XLT captures and records all HTTP requests, status codes, headers, and timings automatically.
Validation Strategy
Rigorous validation ensures that test cases detect functional regressions and subtle application errors during load tests.
Pre-Validation
Pre-validations verify that the target page contains the elements and data required to execute the upcoming interaction. For example, before submitting a search form, pre-validation checks that the search input field is present. If a prerequisite is missing, the action fails immediately with a descriptive assertion error rather than timing out or failing unpredictably.
Post-Validation
Post-validations verify the outcome of the action. They check that the application returned expected data, updated the cart count, displayed confirmation messages, or redirected to the correct target URL.
Example: E-Commerce Search Flow
Consider an e-commerce search journey:
- Open the homepage (
OpenHomepage). - Execute a search query (
Search). - Select an item from the search results to view product details (
ViewProductDetails).
In this flow:
- The entire test execution constitutes one Transaction (
TSearch). OpenHomepage,Search, andViewProductDetailsare individual Actions.- Each action triggers one or more HTTP Requests recorded by XLT.
- Pre- and post-validations ensure each step succeeds before the next begins.