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