behave-trace 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- behave_trace/__init__.py +61 -0
- behave_trace/__main__.py +10 -0
- behave_trace/assets/css/viewer.css +828 -0
- behave_trace/assets/index.html +361 -0
- behave_trace/assets/js/viewer.js +244 -0
- behave_trace/attach.py +141 -0
- behave_trace/cli/__init__.py +0 -0
- behave_trace/cli/app.py +109 -0
- behave_trace/collector.py +343 -0
- behave_trace/formatter.py +115 -0
- behave_trace/models.py +381 -0
- behave_trace/py.typed +0 -0
- behave_trace/serializer.py +232 -0
- behave_trace/utils.py +43 -0
- behave_trace/viewer/__init__.py +0 -0
- behave_trace/viewer/browser.py +59 -0
- behave_trace/viewer/server.py +141 -0
- behave_trace-1.0.0.dist-info/METADATA +171 -0
- behave_trace-1.0.0.dist-info/RECORD +23 -0
- behave_trace-1.0.0.dist-info/WHEEL +4 -0
- behave_trace-1.0.0.dist-info/entry_points.txt +5 -0
- behave_trace-1.0.0.dist-info/licenses/LICENSE +21 -0
- behave_trace.pth +1 -0
behave_trace/__init__.py
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"""behave-trace — Trace viewer and step-by-step debugger for Behave BDD.
|
|
2
|
+
|
|
3
|
+
Two-phase model (like Playwright)::
|
|
4
|
+
|
|
5
|
+
# 1. Capture
|
|
6
|
+
behave --format behave-trace -o trace.json
|
|
7
|
+
|
|
8
|
+
# 2. Visualize
|
|
9
|
+
behave-trace show trace.json
|
|
10
|
+
|
|
11
|
+
Public API::
|
|
12
|
+
|
|
13
|
+
from behave_trace import TraceFormatter, Trace
|
|
14
|
+
from behave_trace import attach_screenshot, attach_dom, log
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from __future__ import annotations
|
|
18
|
+
|
|
19
|
+
from .attach import attach_dom, attach_screenshot, attach_text, log
|
|
20
|
+
from .formatter import TraceFormatter
|
|
21
|
+
from .models import (
|
|
22
|
+
Artifact,
|
|
23
|
+
Background,
|
|
24
|
+
DataTable,
|
|
25
|
+
Environment,
|
|
26
|
+
ErrorInfo,
|
|
27
|
+
Feature,
|
|
28
|
+
Scenario,
|
|
29
|
+
Step,
|
|
30
|
+
Trace,
|
|
31
|
+
TraceStats,
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
__version__ = "0.1.0"
|
|
35
|
+
|
|
36
|
+
# Register formatter with Behave's internal registry (Behave 1.3.x doesn't
|
|
37
|
+
# auto-discover entry points — it uses a manual registry).
|
|
38
|
+
try:
|
|
39
|
+
from behave.formatter._registry import register_as
|
|
40
|
+
|
|
41
|
+
register_as("behave-trace", "behave_trace.formatter:TraceFormatter")
|
|
42
|
+
except Exception:
|
|
43
|
+
pass
|
|
44
|
+
|
|
45
|
+
__all__ = [
|
|
46
|
+
"Artifact",
|
|
47
|
+
"Background",
|
|
48
|
+
"DataTable",
|
|
49
|
+
"Environment",
|
|
50
|
+
"ErrorInfo",
|
|
51
|
+
"Feature",
|
|
52
|
+
"Scenario",
|
|
53
|
+
"Step",
|
|
54
|
+
"Trace",
|
|
55
|
+
"TraceFormatter",
|
|
56
|
+
"TraceStats",
|
|
57
|
+
"attach_dom",
|
|
58
|
+
"attach_screenshot",
|
|
59
|
+
"attach_text",
|
|
60
|
+
"log",
|
|
61
|
+
]
|