add test with step to dummy tests

This commit is contained in:
Dmitry Shulyak
2013-07-21 10:37:30 +03:00
parent 4e3479a3b2
commit 68c6c98f76
4 changed files with 8 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ class Dummy_test(unittest.TestCase):
def test_long_pass(self):
"""Will sleep 5 sec
"""
time.sleep(15)
time.sleep(1)
self.assertTrue(True)
def test_fast_fail(self):
@@ -27,4 +27,7 @@ class Dummy_test(unittest.TestCase):
"""And fast error
"""
conn = httplib.HTTPSConnection('random.random/random')
conn.request("GET", "/random.aspx")
conn.request("GET", "/random.aspx")
def test_fail_with_step(self):
self.fail('Step 3 Failed: MEssaasasas')

View File

@@ -18,4 +18,4 @@ def make_requests(claster_id, test_set):
if __name__ == '__main__':
make_requests('307', 'plugin_general')
make_requests('308', 'plugin_general')

View File

@@ -80,6 +80,7 @@ class StoragePlugin(Plugin):
data['name'], data['description'], data['duration'] =\
nose_utils.get_description(test)
data['message'] = None
data['step'] = None
data['traceback'] = None
log.info('DISCOVERY FOR %s WITH DATA %s' % (test.id(), data))
self.storage.add_sets_test(self.test_run_id, test.id(), data)

View File

@@ -75,6 +75,7 @@ def format_exception(exc_info):
def format_failure_message(message):
message = get_exc_message(message)
matcher = re.search(
r'^[a-zA-Z]+\s?(\d+)\s?[a-zA-Z]+\s?[\.:]\s?(.+)',
message)