Test Record
Overview
All WebRunner actions can be automatically recorded for audit trails and report generation.
The global instance test_record_instance manages recording state and stores records.
Enable Recording
Recording is disabled by default. Enable it before running actions:
from je_web_runner import test_record_instance
test_record_instance.set_record_enable(True)
Or via the action executor:
from je_web_runner import execute_action
execute_action([
["WR_set_record_enable", {"set_enable": True}],
# ... your actions ...
])
Accessing Records
from je_web_runner import test_record_instance
test_record_instance.set_record_enable(True)
# ... perform automation ...
# Access records
records = test_record_instance.test_record_list
for record in records:
print(record)
Record Format
Each record is a dictionary with the following fields:
Field |
Type |
Description |
|---|---|---|
|
|
Name of the executed function |
|
|
Parameters passed to the function |
|
|
Timestamp of execution (e.g., |
|
|
Exception message or |
Example record:
{
"function_name": "to_url",
"local_param": {"url": "https://example.com"},
"time": "2025-01-01 12:00:00",
"program_exception": "None"
}
Clearing Records
test_record_instance.clean_record()
Attributes
Attribute |
Type |
Description |
|---|---|---|
|
|
List of all recorded actions |
|
|
Whether recording is currently enabled |