Ejemplo n.º 1
0
def main(num_agents, rampup, interval, duration, tc_xml_filename, log_msgs, output_dir=None, test_name=None):
    if not config.HTTP_DEBUG:
        # turn off stdout and stderr
        sys.stdout = open(os.devnull, 'w')
        sys.stderr = open(os.devnull, 'w')
    
    runtime_stats = {}
    error_queue = []
    
    interval = interval / 1000.0  # convert from millisecs to secs
   
    if test_name:
        if output_dir:
            output_dir = output_dir + '/' + test_name

    # create a load manager
    lm = LoadManager(num_agents, interval, rampup, log_msgs, runtime_stats, error_queue, output_dir, test_name,)
    
    # load the test cases
    try:
        #cases = xmlparse.load_xml_cases(tc_xml_filename)
        cases = caseparse.load_cases()
        for req in cases:
            lm.add_req(req)
    except Exception, e:
        print 'ERROR: can not parse testcase file: %s' % e
        sys.exit(1)
Ejemplo n.º 2
0
def main(num_agents, rampup, interval, duration, tc_xml_filename, log_msgs, output_dir=None, test_name=None):
    runtime_stats = {}
    error_queue = []
    interval = interval / 1000.0  # convert from millisecs to secs

    # create a load manager
    lm = LoadManager(num_agents, interval, rampup, log_msgs, runtime_stats, error_queue, output_dir, test_name)

    # load the test cases
    try:
        # cases = xmlparse.load_xml_cases(tc_xml_filename)
        cases = caseparse.load_cases()
        for req in cases:
            lm.add_req(req)
    except Exception, e:
        print "ERROR: can not parse testcase file: %s" % e
        sys.exit(1)