Example #1
0
def api_methodcmd(name, args):
    if not paths.suite_defined(): return # cannot run without project env defined
    import api_method
    if name:
        api_method.run_method(name, args)
    else:
        api_method.show_methods()
Example #2
0
def api_methodcmd(name, args):
    if not paths.suite_defined():
        return  # cannot run without project env defined
    import api_method
    if name:
        api_method.run_method(name, args)
    else:
        api_method.show_methods()
Example #3
0
def test_config_reportcmd(action, run_id, title):
    if not paths.suite_defined(): return # cannot run without project env defined
    import config_report
    if action == "running":
        config_report.generate_for_running_by_id(run_id, title)
    if action == "completed":
        config_report.generate_for_completed_by_id(run_id, title)
    else:
        config_report.list_runs()
        print("Generate the report with: oimp report config [running/completed] [program_run_name]")
Example #4
0
def test_configcmd(name):
    if not paths.suite_defined(): return # cannot run without project env defined
    import test_config
    if name:
        configs = test_config.get_configs()
        config  = configs[name]
        run_id  = test_config.start(config['id'])
        # config_report.start_report(run_id, name) # disabled dynamic reporting for now
    else:
        test_config.show_configs()
Example #5
0
def sequencecmd(name, run_description):
    if not paths.suite_defined(): return # cannot run without project env defined
    import sequence
    if name:
        if not run_description:
            print("Add a second argument to describe the program execution, e.g.: '40 web fronts, Redis backend'")
        else:
            sequence.start(name, run_description)
    else:
        sequence.show_sequences()
Example #6
0
def test_configcmd(name):
    if not paths.suite_defined():
        return  # cannot run without project env defined
    import test_config
    if name:
        configs = test_config.get_configs()
        config = configs[name]
        run_id = test_config.start(config['id'])
        # config_report.start_report(run_id, name) # disabled dynamic reporting for now
    else:
        test_config.show_configs()
Example #7
0
def test_config_reportcmd(action, run_id, title):
    if not paths.suite_defined():
        return  # cannot run without project env defined
    import config_report
    if action == "running":
        config_report.generate_for_running_by_id(run_id, title)
    if action == "completed":
        config_report.generate_for_completed_by_id(run_id, title)
    else:
        config_report.list_runs()
        print(
            "Generate the report with: oimp report config [running/completed] [program_run_name]"
        )
Example #8
0
def sequencecmd(name, run_description):
    if not paths.suite_defined():
        return  # cannot run without project env defined
    import sequence
    if name:
        if not run_description:
            print(
                "Add a second argument to describe the program execution, e.g.: '40 web fronts, Redis backend'"
            )
        else:
            sequence.start(name, run_description)
    else:
        sequence.show_sequences()
Example #9
0
def program_reportcmd(action, program_run_id):
    if not paths.suite_defined(): return # cannot run without project env defined
    import program_report
    import combined_programs_report
    if action == "running":
        program_report.generate_for_running(program_run_id)
    elif action == "completed":
        program_report.generate_for_completed(program_run_id)
    elif action == "combine":
        combined_programs_report.generate(program_run_id.split(','))
    else:
        program_report.list_runs()
        print("Generate the report with: oimp report program [running/completed/combine] [program_run_name(s)]")
Example #10
0
def program_reportcmd(action, program_run_id):
    if not paths.suite_defined():
        return  # cannot run without project env defined
    import program_report
    import combined_programs_report
    if action == "running":
        program_report.generate_for_running(program_run_id)
    elif action == "completed":
        program_report.generate_for_completed(program_run_id)
    elif action == "combine":
        combined_programs_report.generate(program_run_id.split(','))
    else:
        program_report.list_runs()
        print(
            "Generate the report with: oimp report program [running/completed/combine] [program_run_name(s)]"
        )
Example #11
0
def scenariocmd(action, name):
    if not paths.suite_defined(): return # cannot run without project env defined
    import scenario
    import code
    if action == "validate":
        if name:
            scenario_cfg = scenario.get(name)
            code.validate(name, scenario_cfg['id'])
        else:
            scenario.show_scenarios()
    elif action == "update":
        scenario.update(name)
    else:
        print("""To validate scenario:
oimp scenario validate [scenario_name]

To update all scenarios:

oimp scenario update

To update a scenario:

oimp scenario update [name]""")
Example #12
0
def scenariocmd(action, name):
    if not paths.suite_defined():
        return  # cannot run without project env defined
    import scenario
    import code
    if action == "validate":
        if name:
            scenario_cfg = scenario.get(name)
            code.validate(name, scenario_cfg['id'])
        else:
            scenario.show_scenarios()
    elif action == "update":
        scenario.update(name)
    else:
        print("""To validate scenario:
oimp scenario validate [scenario_name]

To update all scenarios:

oimp scenario update

To update a scenario:

oimp scenario update [name]""")
Example #13
0
def targetcmd():
    if not paths.suite_defined():
        return  # cannot run without project env defined
    import target
    target.show_targets()
Example #14
0
def targetcmd():
    if not paths.suite_defined(): return # cannot run without project env defined
    import target
    target.show_targets()