-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Release notes for XLT 8.6.0 * fix sample code --------- Co-authored-by: Joerg Werner <[email protected]>
- Loading branch information
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
title: 8.6.x | ||
linkTitle: 8.6.x | ||
|
||
weight: 62 | ||
type: docs | ||
|
||
date: 2025-01-13 | ||
|
||
description: > | ||
Custom Data Logger | ||
sitemap: | ||
changefreq: never | ||
priority: 0.1 | ||
--- | ||
|
||
## XLT 8.6.0 | ||
|
||
### Framework | ||
|
||
#### Custom Data Logger | ||
|
||
When load testing, we often need to pass test data such as usernames, SKUs, coupon codes, or the like. Sometimes we want to know in retrospect which data items were actually used during a load test. Typically, this is solved by having the test scenario write the values to the logs or to a custom file. If we wanted to analyze the data used, we would first have to download the test result dataset and somehow extract the data from the log or data files. | ||
|
||
In this version of XLT, we have added the new *Custom Data Logger* feature, which can replace any custom solution in most cases. This feature allows you to log custom data lines in different scopes using a simple API. A scope is a custom string that describes the data to log, for example "users" or "skus". All data lines logged in a given scope are grouped together. | ||
|
||
A data line must be a string, but the format of the line is unspecified. It can be a single value, a structured data record such as CSV, or any other custom format. You can specify the extension of the resulting data files to reflect the format used (`*.log` by default). You can also specify a file header. See below for an example of how to set up the data logger for the "users" scope to use a CSV file: | ||
|
||
```java | ||
// one-time setup before first use | ||
DataLogger logger = Session.getCurrent().getDataManager().dataLogger("users"); | ||
logger.setExtension("csv"); | ||
logger.setHeader("username,password,email"); | ||
``` | ||
|
||
Logging a corresponding user data line in the "users" scope is done in this way: | ||
|
||
```java | ||
Session.getCurrent().getDataManager().dataLogger("users").log("tmayer,9sadfasdf28a,[email protected]"); | ||
|
||
// same as above, but less boilerplate | ||
Session.logData("users", "tmayer,9sadfasdf28a,[email protected]"); | ||
``` | ||
|
||
Data lines are written to separate files in the `results` directory, grouped by test user and scope. For example: | ||
|
||
``` | ||
ac0001_us-central1_00/TCheckout/45/custom_log_users.csv | ||
ac0001_us-central1_00/TCheckout/45/custom_log_skus.log | ||
``` | ||
|
||
Custom data is also made available in the load test report. See the new *Custom Data* section on the *Custom Values* report page. Since the number of logged data lines can be huge, they are not directly viewable, but the report provides links to download the data as a ZIP archive file, one for each scope. The archive files are located in the `custom_data_logs` directory in the report. For example: | ||
|
||
``` | ||
custom_data_logs/users.zip | ||
custom_data_logs/skus.zip | ||
``` | ||
|
||
#### Other Changes | ||
|
||
* Fixed a problem with caching resources and revalidating expired resources. Specifically, XLT took the "no-cache" directive literally and re-requested affected resources without a conditional GET. | ||
* Result browsers were not displayed correctly on mobile devices. Fixed. | ||
|