Skip to content

Commit

Permalink
Merge pull request #217 from Xceptance/143-debug_data_in_result_browser
Browse files Browse the repository at this point in the history
how to add debug data to the result browser
  • Loading branch information
js-xc authored Jan 26, 2024
2 parents ccb5fcb + ab27f39 commit 8ec0e5d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions content/en/xlt/load-testing/How-Tos/debug-data-result-browser.md
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.
2 changes: 1 addition & 1 deletion content/en/xlt/load-testing/How-Tos/exclusive-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ type: docs
draft: true

description: >
How-to provide data exclusively to a user.
How to provide data exclusively to a user.
---
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8ec0e5d

Please sign in to comment.