Logo Search packages:      
Sourcecode: mago version File versions  Download package

def mago::cmd::main::main (   args = sys.argv  ) 

Execute automated tests

Definition at line 104 of file main.py.

00104                        :
    """
    Execute automated tests
    """
    # For the moment, all applications should be running in English
    ldtp.setlocale("C")

    # Get shared directory based on the directory in which binary is located
    options = parse_options(args)
    configure_logging(options.log_level, options.log)

    logging.debug('MAGO_SHARE: %s' % globals.MAGO_SHARE)
    logging.debug('MAGO_PATH: %s' % ':'.join(globals.MAGO_PATH))
    logging.debug('SCREENSHOTS_SHARE: %s' % globals.SCREENSHOTS_SHARE)

    apps = discover_applications(globals.MAGO_PATH,
                                 options.applications,
                                 options.suite_names,
                                 options.suite_files,
                                 options.cases)

    # Execute test cases
    if not apps:
        logging.warning("No test applications found")
    else:
        if not options.info:
            for app in apps:
                process_application(app, options.target)
        else:
            for app in apps:
                print "Application: %s - %s" % (app.name, app.path)
                for suite in app.suites():
                    print "- Suite: %s - %s" % (suite.name, suite.filename)
                    for case in suite.cases():
                        print " - Case: %s" % case.name

    return 0


if __name__ == "__main__":


Generated by  Doxygen 1.6.0   Back to index