def testcycle_has_percent_complete_of_X(step, stored_testcycle, testcycle_name, exp_percent):
    testcycleModel = TestcycleModel()
    testcycle = testcycleModel.get_stored_or_store_obj(stored_testcycle, testcycle_name)
    testcycle_id = get_resource_identity(testcycle)[0]

    # get the list of testcases for this testcycle
    act_percent = testcycleModel.get_percent_complete(testcycle_id)

    eq_(act_percent[ns("categoryValue")], int(exp_percent), "percent complete check")
Example #2
0
def testcycle_has_percent_complete_of_X(step, stored_testcycle, testcycle_name,
                                        exp_percent):
    testcycleModel = TestcycleModel()
    testcycle = testcycleModel.get_stored_or_store_obj(stored_testcycle,
                                                       testcycle_name)
    testcycle_id = get_resource_identity(testcycle)[0]

    # get the list of testcases for this testcycle
    act_percent = testcycleModel.get_percent_complete(testcycle_id)

    eq_(act_percent[ns("categoryValue")], int(exp_percent),
        "percent complete check")
def testcycle_has_team_members(step, stored_testcycle, testcycle_name, expect_any):
    testcycleModel = TestcycleModel()
    testcycle = testcycleModel.get_stored_or_store_obj(stored_testcycle, testcycle_name)
    testcycle_id = get_resource_identity(testcycle)[0]

    teammember_list = testcycleModel.get_team_members_list(testcycle_id)

    eq_list_length(teammember_list, step.hashes)

    for teammember in step.hashes:
        names = teammember["name"].split()

        verify_single_item_in_list(teammember_list,
                                   params = {"firstName": names[0],
                                             "lastName": names[1]}
                                   )
Example #4
0
def testcycle_has_testruns(step, stored_testcycle, testcycle_name, expect_any):
    testcycleModel = TestcycleModel()
    testcycle = testcycleModel.get_stored_or_store_obj(stored_testcycle,
                                                       testcycle_name)
    testcycle_id = get_resource_identity(testcycle)[0]

    # get the list of testcases for this testcycle
    testrun_list = testcycleModel.get_testrun_list(testcycle_id)

    eq_list_length(testrun_list, step.hashes)

    # walk through and verify that each testcase has the expected status
    for testrun in step.hashes:
        # find that in the list of testcases
        exp_name = testrun["name"]

        verify_single_item_in_list(testrun_list, "name", exp_name)
def testcycle_has_testruns(step, stored_testcycle, testcycle_name, expect_any):
    testcycleModel = TestcycleModel()
    testcycle = testcycleModel.get_stored_or_store_obj(stored_testcycle, testcycle_name)
    testcycle_id = get_resource_identity(testcycle)[0]

    # get the list of testcases for this testcycle
    testrun_list = testcycleModel.get_testrun_list(testcycle_id)

    eq_list_length(testrun_list, step.hashes)

    # walk through and verify that each testcase has the expected status
    for testrun in step.hashes:
        # find that in the list of testcases
        exp_name = testrun["name"]

        verify_single_item_in_list(testrun_list,
                                   "name",
                                   exp_name)
def testcycle_has_summary_counts(step, stored_testcycle, testcycle_name):
    testcycleModel = TestcycleModel()
    testcycle = testcycleModel.get_stored_or_store_obj(stored_testcycle, testcycle_name)
    testcycle_id = get_resource_identity(testcycle)[0]

    # get the list of testcases for this testcycle
    summary_list = testcycleModel.get_summary_list(testcycle_id)

    eq_list_length(summary_list, step.hashes)

    # walk through and verify that each testcase has the expected status
    for category in step.hashes:
        # find that in the list of testcases
        status_id = get_result_status_id(category["name"])
        categoryInfo = verify_single_item_in_list(summary_list, "categoryName",
                                                  status_id)
        assert str(categoryInfo[ns("categoryValue")]) == category["count"], \
            "%s count was wrong.  Expected categoryName: %s , categoryValue: %s:\n%s" % \
            (category["name"], status_id, category["count"], jstr(categoryInfo))
Example #7
0
def testcycle_has_team_members(step, stored_testcycle, testcycle_name,
                               expect_any):
    testcycleModel = TestcycleModel()
    testcycle = testcycleModel.get_stored_or_store_obj(stored_testcycle,
                                                       testcycle_name)
    testcycle_id = get_resource_identity(testcycle)[0]

    teammember_list = testcycleModel.get_team_members_list(testcycle_id)

    eq_list_length(teammember_list, step.hashes)

    for teammember in step.hashes:
        names = teammember["name"].split()

        verify_single_item_in_list(teammember_list,
                                   params={
                                       "firstName": names[0],
                                       "lastName": names[1]
                                   })
def testcycle_has_environmentgroups(step, stored_testcycle, testcycle_name, expect_any):
    testcycleModel = TestcycleModel()
    testcycle = testcycleModel.get_stored_or_store_obj(stored_testcycle, testcycle_name)
    testcycle_id = get_resource_identity(testcycle)[0]

    # get the list of testcases for this testcycle
    envgrp_list = testcycleModel.get_environmentgroup_list(testcycle_id)

    # this checks that the lengths match.  The expect_any holder is not used, but it allows for
    # alternate wording in the step.
    eq_list_length(envgrp_list, step.hashes)

    # walk through and verify that each testcase has the expected status
    for envgrp in step.hashes:
        # find that in the list of testcases
        exp_name = envgrp["name"]

        verify_single_item_in_list(envgrp_list,
                                   "name",
                                   exp_name)
Example #9
0
def testcycle_has_summary_counts(step, stored_testcycle, testcycle_name):
    testcycleModel = TestcycleModel()
    testcycle = testcycleModel.get_stored_or_store_obj(stored_testcycle,
                                                       testcycle_name)
    testcycle_id = get_resource_identity(testcycle)[0]

    # get the list of testcases for this testcycle
    summary_list = testcycleModel.get_summary_list(testcycle_id)

    eq_list_length(summary_list, step.hashes)

    # walk through and verify that each testcase has the expected status
    for category in step.hashes:
        # find that in the list of testcases
        status_id = get_result_status_id(category["name"])
        categoryInfo = verify_single_item_in_list(summary_list, "categoryName",
                                                  status_id)
        assert str(categoryInfo[ns("categoryValue")]) == category["count"], \
            "%s count was wrong.  Expected categoryName: %s , categoryValue: %s:\n%s" % \
            (category["name"], status_id, category["count"], jstr(categoryInfo))
Example #10
0
def testcycle_has_environmentgroups(step, stored_testcycle, testcycle_name,
                                    expect_any):
    testcycleModel = TestcycleModel()
    testcycle = testcycleModel.get_stored_or_store_obj(stored_testcycle,
                                                       testcycle_name)
    testcycle_id = get_resource_identity(testcycle)[0]

    # get the list of testcases for this testcycle
    envgrp_list = testcycleModel.get_environmentgroup_list(testcycle_id)

    # this checks that the lengths match.  The expect_any holder is not used, but it allows for
    # alternate wording in the step.
    eq_list_length(envgrp_list, step.hashes)

    # walk through and verify that each testcase has the expected status
    for envgrp in step.hashes:
        # find that in the list of testcases
        exp_name = envgrp["name"]

        verify_single_item_in_list(envgrp_list, "name", exp_name)
def approve_all_results_for_testcycle(step, stored_testcycle, testcycle_name):
    testcycleModel = TestcycleModel()
    testcycle = testcycleModel.get_stored_or_store_obj(stored_testcycle, testcycle_name)

    testcycleModel.approve_all_results(testcycle)
Example #12
0
def approve_all_results_for_testcycle(step, stored_testcycle, testcycle_name):
    testcycleModel = TestcycleModel()
    testcycle = testcycleModel.get_stored_or_store_obj(stored_testcycle,
                                                       testcycle_name)

    testcycleModel.approve_all_results(testcycle)