def main(): """Starts in-process server and runs all test cases in this module.""" fix_sys_path() etl._set_env_vars_from_app_yaml() parsed_args = _PARSER.parse_args() test_suite = create_test_suite(parsed_args) kwargs = { 'verbosity': 2, } if parsed_args.pdb: kwargs['resultclass'] = DebugTestResult result = unittest.TextTestRunner(**kwargs).run(test_suite) if result.errors or result.failures: raise Exception( 'Test suite failed: %s errors, %s failures of ' ' %s tests run.' % (len(result.errors), len(result.failures), result.testsRun)) import tests.functional.actions as actions count = len(actions.UNIQUE_URLS_FOUND.keys()) result.stream.writeln('INFO: Unique URLs found: %s' % count) result.stream.writeln('INFO: All %s tests PASSED!' % result.testsRun)
def main(): """Starts in-process server and runs all test cases in this module.""" fix_sys_path() etl._set_env_vars_from_app_yaml() parsed_args = _PARSER.parse_args() test_suite = create_test_suite(parsed_args) kwargs = { 'verbosity': 2, } if parsed_args.pdb: kwargs['resultclass'] = DebugTestResult result = unittest.TextTestRunner(**kwargs).run(test_suite) if result.errors or result.failures: raise Exception( 'Test suite failed: %s errors, %s failures of ' ' %s tests run.' % ( len(result.errors), len(result.failures), result.testsRun)) import tests.functional.actions as actions count = len(actions.UNIQUE_URLS_FOUND.keys()) result.stream.writeln('INFO: Unique URLs found: %s' % count) result.stream.writeln('INFO: All %s tests PASSED!' % result.testsRun)
def main(): """Starts in-process server and runs all test cases in this module.""" fix_sys_path() etl._set_env_vars_from_app_yaml() parsed_args = _PARSER.parse_args() test_suite = create_test_suite(parsed_args) all_tags = {} for test in iterate_tests(test_suite): if hasattr(test, 'TAGS'): for tag in test.TAGS: if isinstance(test.TAGS[tag], set) and tag in all_tags: all_tags[tag].update(test.TAGS[tag]) else: all_tags[tag] = test.TAGS[tag] server = None if TestBase.REQUIRES_INTEGRATION_SERVER in all_tags: ensure_port_available(8081) ensure_port_available(8000) server = start_integration_server( parsed_args.integration_server_start_cmd, all_tags.get(TestBase.REQUIRES_TESTING_MODULES, set())) result = unittest.TextTestRunner(verbosity=2).run(test_suite) if server: stop_integration_server( server, all_tags.get(TestBase.REQUIRES_TESTING_MODULES, set())) if result.errors or result.failures: raise Exception( 'Test suite failed: %s errors, %s failures of ' ' %s tests run.' % (len(result.errors), len(result.failures), result.testsRun)) import tests.functional.actions as actions count = len(actions.UNIQUE_URLS_FOUND.keys()) result.stream.writeln('INFO: Unique URLs found: %s' % count) result.stream.writeln('INFO: All %s tests PASSED!' % result.testsRun)
def main(): """Starts in-process server and runs all test cases in this module.""" fix_sys_path() etl._set_env_vars_from_app_yaml() parsed_args = _PARSER.parse_args() test_suite = create_test_suite(parsed_args) all_tags = {} for test in iterate_tests(test_suite): if hasattr(test, 'TAGS'): for tag in test.TAGS: if isinstance(test.TAGS[tag], set) and tag in all_tags: all_tags[tag].update(test.TAGS[tag]) else: all_tags[tag] = test.TAGS[tag] server = None if TestBase.REQUIRES_INTEGRATION_SERVER in all_tags: ensure_port_available(8081) ensure_port_available(8000) server = start_integration_server( parsed_args.integration_server_start_cmd, all_tags.get(TestBase.REQUIRES_TESTING_MODULES, set())) result = unittest.TextTestRunner(verbosity=2).run(test_suite) if server: stop_integration_server( server, all_tags.get(TestBase.REQUIRES_TESTING_MODULES, set())) if result.errors or result.failures: raise Exception( 'Test suite failed: %s errors, %s failures of ' ' %s tests run.' % ( len(result.errors), len(result.failures), result.testsRun)) import tests.functional.actions as actions count = len(actions.UNIQUE_URLS_FOUND.keys()) result.stream.writeln('INFO: Unique URLs found: %s' % count) result.stream.writeln('INFO: All %s tests PASSED!' % result.testsRun)