def main(args):
if '<STR_LIT>' in args and args['<STR_LIT>'] is not None:<EOL><INDENT>logger.setLevel(LOGGING_LEVELS.get(<EOL>args['<STR_LIT>'].lower(), logging.NOTSET))<EOL><DEDENT>if '<STR_LIT>' in args and args['<STR_LIT>']:<EOL><INDENT>extensions = args['<STR_LIT>'].split('<STR_LIT:;>')<EOL>working_folder = args['<STR_LIT>']<EOL>if working_folder not in sys.path:<EOL><INDENT>sys.path.insert(<NUM_LIT:0>, working_folder)<EOL><DEDENT>register_extensions(extensions)<EOL><DEDENT>test_file = args['<STR_LIT:test>']<EOL>test_structure = read_test_file(test_file)<EOL>my_vars = None<EOL>if '<STR_LIT>' in args and args['<STR_LIT>'] is not None:<EOL><INDENT>my_vars = yaml.safe_load(args['<STR_LIT>'])<EOL><DEDENT>if my_vars and not isinstance(my_vars, dict):<EOL><INDENT>raise Exception("<STR_LIT>")<EOL><DEDENT>base_url = args['<STR_LIT:url>']<EOL>if '<STR_LIT>' in args and args['<STR_LIT>']:<EOL><INDENT>base_url = '<STR_LIT>'<EOL><DEDENT>tests = parse_testsets(base_url, test_structure,<EOL>working_directory=os.path.dirname(test_file), vars=my_vars)<EOL>for t in tests:<EOL><INDENT>if '<STR_LIT>' in args and args['<STR_LIT>'] is not None and bool(args['<STR_LIT>']):<EOL><INDENT>t.config.print_bodies = safe_to_bool(args['<STR_LIT>'])<EOL><DEDENT>if '<STR_LIT>' in args and args['<STR_LIT>'] is not None and bool(args['<STR_LIT>']):<EOL><INDENT>t.config.print_headers = safe_to_bool(args['<STR_LIT>'])<EOL><DEDENT>if '<STR_LIT>' in args and args['<STR_LIT>'] is not None:<EOL><INDENT>t.config.interactive = safe_to_bool(args['<STR_LIT>'])<EOL><DEDENT>if '<STR_LIT>' in args and args['<STR_LIT>'] is not None:<EOL><INDENT>t.config.verbose = safe_to_bool(args['<STR_LIT>'])<EOL><DEDENT>if '<STR_LIT>' in args and args['<STR_LIT>'] is not None:<EOL><INDENT>t.config.ssl_insecure = safe_to_bool(args['<STR_LIT>'])<EOL><DEDENT>if '<STR_LIT>' in args and args['<STR_LIT>'] is not None:<EOL><INDENT>t.config.skip_term_colors = safe_to_bool(args['<STR_LIT>'])<EOL><DEDENT><DEDENT>failures = run_testsets(tests)<EOL>sys.exit(failures)<EOL>
Execute a test against the given base url.

Keys allowed for args:
    url           - REQUIRED - Base URL
    test          - REQUIRED - Test file (yaml)
    print_bodies  - OPTIONAL - print response body
    print_headers  - OPTIONAL - print response headers
    log           - OPTIONAL - set logging level {debug,info,warning,error,critical} (default=warning)
    interactive   - OPTIONAL - mode that prints info before and after test exectuion and pauses for user input for each test
    absolute_urls - OPTIONAL - mode that treats URLs in tests as absolute/full URLs instead of relative URLs
    skip_term_colors - OPTIONAL - mode that turn off the output term colors