...
Include Page | ||||
---|---|---|---|---|
|
Table of Contents |
---|
Description
- Perform assertions about one or more log files, or one or more log file excerpts.
Attributes
List of assert-logs()
Attributes
Include Page | ||||
---|---|---|---|---|
|
Individual assert-logs()
Attributes
expected-log:
- An object. An instance of assert-log common properties.
...
- A list of objects. Each is an instance of assert-log common properties.
assertion-mode:
- Valid values:
match-all
- Each expected log must match the criteria specified in its assert-log common properties.
match-any
- At least one expected log must match the criteria specified in its assert-log common properties.
failure-id:
- Identifier to use as a Failure ID if the log assertion fails.
...
- An object. It is an instance of assert-log common properties.
- Any
log-defaults
property not specified for one of the expected logs will be applied as though it were specified.
Example
Location of expected-log-file
Log Excerpt Files
Section | |||||||
---|---|---|---|---|---|---|---|
|
assert-logs
Code Example
- In the example below, all the
expected-log
conditions must be true, or the test will fail. - This is because
match-all
was specified forassertion-mode
. - In this example, there is actually only one log file, the one specified in log-name-pattern.
- The
expected-log-file
refers to a file that contains an excerpt of text, usually spanning several lines, that you expect to find in the log file.
...