Example #1
0
 def _inner_func(*args, **kwargs):
     test_file_src_path = inspect.getsourcefile(original_func)
     if ReadConfig().marker in self.marker :
             test_fixture_name = TestRun.get_class_name(test_file_src_path, ReadConfig().test_case_fixture_suffix)
             fixture_import_handle = Utilities.get_fixture_from_path(test_file_src_path)
             fixture_obj = getattr(fixture_import_handle, test_fixture_name)()
             try:
                 getattr(fixture_obj, 'setup')()
                 sa = Verify()
                 sa.__call__(original_func)
             except AssertionError :
                 Reporter.add_test_report(TestReport(original_func.__name__,"FAILED",[traceback.format_exc()],test_file_src_path))
                 verif_errs_list = globals().get('assertion_status')
                 del verif_errs_list
             except :
                 Reporter.add_test_report(TestReport(original_func.__name__,"Exception",[],test_file_src_path))
             finally:
                 getattr(fixture_obj, 'teardown')()
     else:
         Reporter.add_test_report(TestReport(original_func.__name__,"SKIPPED",[],test_file_src_path))
Example #2
0
from _src.runner import TestRun

if __name__=='__main__':
    file_path="/Users/vaikuntj/Work/Testing/JATR/conf/default.conf"
    TestRun.executeTestRun(file_path)