mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-09 17:59:36 +08:00
fix html template
This commit is contained in:
@@ -197,7 +197,7 @@
|
|||||||
{% for session_data in step_datas %}
|
{% for session_data in step_datas %}
|
||||||
{% set step_index = "{}_{}".format(testcase_index, loop.index) %}
|
{% set step_index = "{}_{}".format(testcase_index, loop.index) %}
|
||||||
<tr id="step_{{step_index}}">
|
<tr id="step_{{step_index}}">
|
||||||
<th class="{{testcase.status}}" style="width:5em;">{{testcase.status}}</th>
|
<th class="{{session_data.status}}" style="width:5em;">{{session_data.status}}</th>
|
||||||
<td colspan="2">{{session_data.name}}</td>
|
<td colspan="2">{{session_data.name}}</td>
|
||||||
<td style="text-align:center;width:6em;">{{ session_data.stat.response_time_ms }} ms</td>
|
<td style="text-align:center;width:6em;">{{ session_data.stat.response_time_ms }} ms</td>
|
||||||
<td class="detail">
|
<td class="detail">
|
||||||
@@ -331,7 +331,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if testcase.attachment %}
|
{% if session_data.status == "failed" %}
|
||||||
<a class="button" href="#popup_attachment_{{step_index}}">traceback</a>
|
<a class="button" href="#popup_attachment_{{step_index}}">traceback</a>
|
||||||
<div id="popup_attachment_{{step_index}}" class="overlay">
|
<div id="popup_attachment_{{step_index}}" class="overlay">
|
||||||
<div class="popup">
|
<div class="popup">
|
||||||
|
|||||||
@@ -86,7 +86,9 @@ class TestCaseRunner(object):
|
|||||||
validators = step.validators
|
validators = step.validators
|
||||||
try:
|
try:
|
||||||
resp_obj.validate(validators, variables_mapping, self.config.functions)
|
resp_obj.validate(validators, variables_mapping, self.config.functions)
|
||||||
|
self.session.data.status = "passed"
|
||||||
except ValidationFailure:
|
except ValidationFailure:
|
||||||
|
self.session.data.status = "failed"
|
||||||
log_req_resp_details()
|
log_req_resp_details()
|
||||||
raise
|
raise
|
||||||
finally:
|
finally:
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ class RequestStat(BaseModel):
|
|||||||
|
|
||||||
|
|
||||||
class SessionData(BaseModel):
|
class SessionData(BaseModel):
|
||||||
|
status: Text = ""
|
||||||
name: Text = ""
|
name: Text = ""
|
||||||
req_resp: List[Dict] = []
|
req_resp: List[Dict] = []
|
||||||
stat: RequestStat = RequestStat()
|
stat: RequestStat = RequestStat()
|
||||||
|
|||||||
Reference in New Issue
Block a user