test¶
Execute a validation test defined in the tests section of the playbook.
Usage Example¶
tests:
- name: file_created
function: file_exists
parameter:
dst: "/tmp/testfile.txt"
description: "Verify test file exists"
actions:
- command:
command: "touch /tmp/testfile.txt"
description: "Create test file"
# Run the test
- test: file_created
# Alternative syntax with description
- test:
name: file_created
description: "Validate file creation"
Parameters¶
Parameter |
Type |
Description |
|---|---|---|
|
string |
Name of the test to execute (required) |
|
string |
Human-readable description (optional) |
Notes¶
Tests must be defined in the
testssection before useTest execution validates forensic artifacts
Failed tests can trigger auto-pull of evidence files (if
auto_pull_on_test_failureenabled)Use
expect_to_fail: truein test definition for negative assertions
See Also¶
Test Functions for available test functions
Test configuration in playbook settings