-
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.
Merge pull request #217 from Xceptance/143-debug_data_in_result_browser
how to add debug data to the result browser
- Loading branch information
Showing
3 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
content/en/xlt/load-testing/How-Tos/debug-data-result-browser.md
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,26 @@ | ||
--- | ||
title: "How to Add Debug Data to the Result Browser" | ||
linkTitle: "Debug Data in Result Browser" | ||
|
||
weight: 260 | ||
type: docs | ||
|
||
description: > | ||
A helpful feature for reproducing testcase failures. | ||
--- | ||
|
||
To aid in error analysis, XTC provides a feature that allows you to add your custom debug data to the result browser: the session's **value log** is a storage for session-specific test parameters and result data. Any value you add to this log will later be available in the result browser. | ||
|
||
{{< image src="how-to/custom_result_browser_data.png" >}} | ||
Result browser containing custom debug data. | ||
{{< /image >}} | ||
|
||
Note that the log will be cleared with each new iteration of the test scenario. The data may help to reproduce test failures by rerunning test scenario with the same data more easily, or simply present contextual data for recreation of error situations, either manually or automatically. This is especially useful if your test case uses random or randomly chosen test parameters. | ||
|
||
You can add data to the value log at any point in your test scenario: | ||
|
||
```java | ||
Session.getCurrent().getValueLog().put("data.I.want.to.keep", "This is essential data for reconstructing the test case I just ran."); | ||
``` | ||
|
||
Data is stored as name/value pairs. Even though the log accepts any Object as the value, the value will later be converted to a string using `Object.toString()` for proper display in the result browser. So make sure your value classes implement this method appropriately. |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.