mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-16 23:47:37 +08:00
fix #104: popup ids are the same in default template
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
__title__ = 'HttpRunner'
|
__title__ = 'HttpRunner'
|
||||||
__description__ = 'HTTP test runner, not just about api test and load test.'
|
__description__ = 'HTTP test runner, not just about api test and load test.'
|
||||||
__url__ = 'https://github.com/HttpRunner/HttpRunner'
|
__url__ = 'https://github.com/HttpRunner/HttpRunner'
|
||||||
__version__ = '0.9.6'
|
__version__ = '0.9.6a1'
|
||||||
__author__ = 'debugtalk'
|
__author__ = 'debugtalk'
|
||||||
__author_email__ = 'mail@debugtalk.com'
|
__author_email__ = 'mail@debugtalk.com'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
|
|||||||
@@ -173,8 +173,6 @@ class Runner(object):
|
|||||||
finally:
|
finally:
|
||||||
setup_teardown(teardown_actions)
|
setup_teardown(teardown_actions)
|
||||||
|
|
||||||
return getattr(self.http_client_session, "meta_data", {})
|
|
||||||
|
|
||||||
def extract_output(self, output_variables_list):
|
def extract_output(self, output_variables_list):
|
||||||
""" extract output variables
|
""" extract output variables
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -12,12 +12,14 @@ class TestCase(unittest.TestCase):
|
|||||||
super(TestCase, self).__init__()
|
super(TestCase, self).__init__()
|
||||||
self.test_runner = test_runner
|
self.test_runner = test_runner
|
||||||
self.testcase_dict = testcase_dict
|
self.testcase_dict = testcase_dict
|
||||||
self.meta_data = {}
|
|
||||||
|
|
||||||
def runTest(self):
|
def runTest(self):
|
||||||
""" run testcase and check result.
|
""" run testcase and check result.
|
||||||
"""
|
"""
|
||||||
self.meta_data = self.test_runner.run_test(self.testcase_dict)
|
try:
|
||||||
|
self.test_runner.run_test(self.testcase_dict)
|
||||||
|
finally:
|
||||||
|
self.meta_data = getattr(self.test_runner.http_client_session, "meta_data", {})
|
||||||
|
|
||||||
class TestSuite(unittest.TestSuite):
|
class TestSuite(unittest.TestSuite):
|
||||||
""" create test suite with a testset, it may include one or several testcases.
|
""" create test suite with a testset, it may include one or several testcases.
|
||||||
|
|||||||
@@ -177,8 +177,8 @@
|
|||||||
<td style="text-align:center;width:6em;">{{ '%0.1f'| format(record.response_time|float) }} ms</td>
|
<td style="text-align:center;width:6em;">{{ '%0.1f'| format(record.response_time|float) }} ms</td>
|
||||||
<td class="detail">
|
<td class="detail">
|
||||||
|
|
||||||
<a class="button" href="#popup_log">log</a>
|
<a class="button" href="#popup_log_{{loop.index}}">log</a>
|
||||||
<div id="popup_log" class="overlay">
|
<div id="popup_log_{{loop.index}}" class="overlay">
|
||||||
<div class="popup">
|
<div class="popup">
|
||||||
<h2>Request and Response data</h2>
|
<h2>Request and Response data</h2>
|
||||||
<a class="close" href="#">×</a>
|
<a class="close" href="#">×</a>
|
||||||
@@ -187,8 +187,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if record.attachment %}
|
{% if record.attachment %}
|
||||||
<a class="button" href="#popup_attachment">traceback</a>
|
<a class="button" href="#popup_attachment_{{loop.index}}">traceback</a>
|
||||||
<div id="popup_attachment" class="overlay">
|
<div id="popup_attachment_{{loop.index}}" class="overlay">
|
||||||
<div class="popup">
|
<div class="popup">
|
||||||
<h2>Traceback Message</h2>
|
<h2>Traceback Message</h2>
|
||||||
<a class="close" href="#">×</a>
|
<a class="close" href="#">×</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user