|
|
|
|
318
|
|
318
|
|
319
|
def testCase(self, name, testcase_execution_level, test_method, *args, **kwargs):
|
319
|
def testCase(self, name, testcase_execution_level, test_method, *args, **kwargs):
|
320
|
if testcase_execution_level <= self[self.KEY_EXEC_LVL]:
|
320
|
if testcase_execution_level <= self[self.KEY_EXEC_LVL]:
|
|
|
321
|
+ sys.stdout.write(' %s...' % name[:75])
|
321
|
tLogger = logging.getLogger('__tLogger__')
|
322
|
tLogger = logging.getLogger('__tLogger__')
|
322
|
tHandler = collectingTestcaseHandler()
|
323
|
tHandler = collectingTestcaseHandler()
|
323
|
if len(tHandler.MY_LOGS) > 0:
|
324
|
if len(tHandler.MY_LOGS) > 0:
|
|
|
|
|
362
|
self[self.KEY_ALL_TESTS] += 1
|
363
|
self[self.KEY_ALL_TESTS] += 1
|
363
|
if self[self.KEY_TESTCASELIST][name]['levelno'] <= logging.INFO:
|
364
|
if self[self.KEY_TESTCASELIST][name]['levelno'] <= logging.INFO:
|
364
|
self[self.KEY_SUCCESS_TESTS] += 1
|
365
|
self[self.KEY_SUCCESS_TESTS] += 1
|
|
|
366
|
+ sys.stdout.write('\033[92mSUCCESS\033[0m\n')
|
365
|
elif self[self.KEY_TESTCASELIST][name]['levelno'] >= logging.ERROR:
|
367
|
elif self[self.KEY_TESTCASELIST][name]['levelno'] >= logging.ERROR:
|
366
|
self[self.KEY_FAILED_TESTS] += 1
|
368
|
self[self.KEY_FAILED_TESTS] += 1
|
|
|
369
|
+ sys.stdout.write('\033[91mFAILED\033[0m\n')
|
367
|
else:
|
370
|
else:
|
368
|
self[self.KEY_POSSIBLY_FAILED_TESTS] += 1
|
371
|
self[self.KEY_POSSIBLY_FAILED_TESTS] += 1
|
|
|
372
|
+ sys.stdout.write('\033[93mPOSSIBLY FAILED\033[0m\n')
|
369
|
# Set testcase time and time_consumption
|
373
|
# Set testcase time and time_consumption
|
370
|
self[self.KEY_TESTCASELIST][name]['time_start'] = self.__testcase__['asctime']
|
374
|
self[self.KEY_TESTCASELIST][name]['time_start'] = self.__testcase__['asctime']
|
371
|
self[self.KEY_TESTCASELIST][name]['time_finished'] = teststep['asctime']
|
375
|
self[self.KEY_TESTCASELIST][name]['time_finished'] = teststep['asctime']
|