Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pulled doc for session::valueLog from releasenotes to manual #254

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions content/en/xlt/load-testing/Manual/440-result-browser.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,53 @@ As described earlier, the output of an action shows the state of the page after
XLT Result Browser - Inspect Element
{{< /image >}}

### General Value Log

Any XLT session provides a general value log. Any value you add to
this log will be made available in the result browser. To view the value
log, click the link with the transaction’s name that is located
above the action list.

{{< image src="user-manual/resultbrowser_value_log.png" >}}
Value Log in the Result Browser
{{< /image >}}

This feature is primarily intended to aid in error analysis. The data in
the result browser may help you to reconstruct and rerun a failed test
case iteration without having to dig into log files, etc. Simply add any
value of special interest and it will be available in the result
browser. This is especially useful if your test case uses random or
randomly chosen test parameters.

To address the problem with random test parameters, XLT adopts this
feature to make the seed value of `XltRandom` - used for the current
test iteration/session - available in the result browser. To rerun a
test case with this seed value (i.e. with the “same randomness”), copy
the seed value from the result browser, add the following line to your
`dev.properties` file, and re-execute the test as usual from your
favorite IDE:

```bash
com.xceptance.xlt.random.initValue = <copied seed value>
```

You may also add your own arbitrary values to the session’s value log.
See below on how to access the value log and add values to it:

```java
Map<String, Object> valueLog = Session.getCurrent().getValueLog();
valueLog.put(“user”, randomEmail);
valueLog.put(“password”, randomPassword);
```

Your data will be stored as simple name/value pairs. Even though the log
accepts any `Object` as value, it still needs to be converted to a
string for proper display in the result browser, so make sure that your
value classes provide a sensible `toString()` method.

{{% note notitle %}} In a load test the value log will be cleared automatically
between two iterations of your test scenario. {{% /note %}}

## Request timeline
In order to let you inspect the temporal sequence
and duration of requests in a graphical timeline view, XLT may
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.