示例#1
0
    apikey = config['rally']['apikey']
    server = config['rally']['server']
    username = config['rally']['username']
    password = config['rally']['password']
    workspace = config['rally']['workspace']
    project = config['rally']['project']

    branch = config['testInfOnGit']['branch']
    aba_list = config['testInfOnGit']['aba_list']
    aba_list = parsestringtolist(aba_list)
    levels = parsestringtolist(config['testInfOnGit']['levels'])
    GIT_USER = config['testInfOnGit']['GIT_USER']
    GIT_PWD = config['testInfOnGit']['GIT_PWD']
    GITHUB_URL = config['testInfOnGit']['GITHUB_URL']

    rallyUtil = RallyUtil()

    testsetIDSource = 'TS43797'
    testsetIDTargets = ['TS43801']

    testcases = rallyUtil.get_testcases_from_testset(testsetIDSource)

    for testsetIDTarget in testsetIDTargets:
        for testcase in testcases:
            rallyUtil.add_testcasetotestset(testsetIDTarget,
                                            testcase.FormattedID)
    print("Done")

    # for testcase in testcasesperABA:
    #     rallyUtil.add_testcasetotestset(testsetID, testcase)
示例#2
0
logger.addHandler(fh)
logger.addHandler(ch)

#################################################################################################
#################################################################################################

if __name__ == '__main__':
    apikey = "_y0jdQIdhTSmCZ1PuzwmeGW1mYWee5UMNsFwUmFuVsEA"
    server = "rally1.rallydev.com"
    username = "******"
    password = ""
    workspace = "MicroStrategy Workspace"
    project = "SR-Intelligence-Metadata"

    rallyUtil = RallyUtil()

    excelname = 'removetestcasefromtestset.xlsx'
    testcasesList = retrieveTestcaseResultFromSheet(excelname)

    for testcaseRow in testcasesList:
        for testcase, info in testcaseRow.items():
            # ident_query = 'WorkProduct.FormattedID = "%s"' % testsetID
            # ident_query = 'WorkProduct.FormattedID = "%s"' % testsetID
            # testcaseResponse = rallyUtil.rally.get('TestCase', fetch=True, query=ident_query,
            #                                        workspace=workspace, project=project)

            testsetID = 'TS35586'
            # testsetID = 'TS34763'

            ident_query = 'FormattedID = %s' % testcase
    coloredlogs.install()
    logging.addLevelName(
        logging.WARNING,
        "\033[1;31m%s\033[1;0m" % logging.getLevelName(logging.WARNING))
    logging.addLevelName(
        logging.ERROR,
        "\033[1;41m%s\033[1;0m" % logging.getLevelName(logging.ERROR))
    apikey = "_y0jdQIdhTSmCZ1PuzwmeGW1mYWee5UMNsFwUmFuVsEA"
    server = "rally1.rallydev.com"
    username = "******"
    password = ""
    workspace = "MicroStrategy Workspace"
    project = "SR-Intelligence"

    rallyUtil = RallyUtil()

    excelname = 'testcase.xlsx'
    testcasesList = retrieveTestcaseResultFromSheet(excelname)

    start_time = datetime.now()

    result = {}
    highlevelresult = {}
    for testcaseRow in testcasesList:
        for defectID, testcase_json in testcaseRow.items():
            # eachdefect = dict()
            result.setdefault(defectID, [])
            highlevelresult.setdefault(defectID, [])
            print(defectID)
                        format='',
                        datefmt='%Y-%m-%d %H:%M:%S',
                        filename='process.log',
                        filemode='w')

    coloredlogs.install()
    logging.addLevelName(logging.WARNING, "\033[1;31m%s\033[1;0m" % logging.getLevelName(logging.WARNING))
    logging.addLevelName(logging.ERROR, "\033[1;41m%s\033[1;0m" % logging.getLevelName(logging.ERROR))
    apikey = "_y0jdQIdhTSmCZ1PuzwmeGW1mYWee5UMNsFwUmFuVsEA"
    server = "rally1.rallydev.com"
    username = "******"
    password = ""
    workspace = "MicroStrategy Workspace"
    project = "SR-Intelligence-Kernel"

    rallyUtil = RallyUtil()

    excelname = 'testcase.xlsx'
    testcasesList = retrieveTestcaseResultFromSheet(excelname)

    start_time = datetime.now()

    result = {}
    highlevelresult = {}
    for testcaseRow in testcasesList:
       for defectID, testcase_json in testcaseRow.items():
           # eachdefect = dict()
           result.setdefault(defectID, [])
           highlevelresult.setdefault(defectID, [])
           print(defectID)
示例#5
0
logger.addHandler(fh)
logger.addHandler(ch)

#################################################################################################
#################################################################################################

if __name__ == '__main__':
    apikey = "_y0jdQIdhTSmCZ1PuzwmeGW1mYWee5UMNsFwUmFuVsEA"
    server = "rally1.rallydev.com"
    username = "******"
    password = ""
    workspace = "MicroStrategy Workspace"
    project = "SR-Intelligence-Kernel"

    rallyUtil = RallyUtil()

    excelname = 'testcasesattachtotestset.xlsx'
    testfoldersList = retrieveTestcaseResultFromSheet(excelname)

    for testsetRow in testfoldersList:
        for testcase, info in testsetRow.items():
            # ident_query = 'WorkProduct.FormattedID = "%s"' % testsetID
            # ident_query = 'WorkProduct.FormattedID = "%s"' % testsetID
            # testcaseResponse = rallyUtil.rally.get('TestCase', fetch=True, query=ident_query,
            #                                        workspace=workspace, project=project)

            # testsetID = 'TS35586'

            # testsetID = 'TS34763'
            #
    apikey = config['rally']['apikey']
    server = config['rally']['server']
    username = config['rally']['username']
    password = config['rally']['password']
    workspace = config['rally']['workspace']
    project = config['rally']['project']

    branch = config['testInfOnGit']['branch']
    aba_list = config['testInfOnGit']['aba_list']
    aba_list = parsestringtolist(aba_list)
    levels = parsestringtolist(config['testInfOnGit']['levels'])
    GIT_USER = config['testInfOnGit']['GIT_USER']
    GIT_PWD = config['testInfOnGit']['GIT_PWD']
    GITHUB_URL = config['testInfOnGit']['GITHUB_URL']

    rallyUtil = RallyUtil()

    testcasesperABA = get_aba_tc_list(branch, aba_list, levels, GIT_USER,
                                      GIT_PWD, GITHUB_URL)
    testsetID = 'TS43796'

    # for aba in testcasesperABA:
    #     if testcasesperABA[aba] is None:
    #         continue
    #     for _, testcases in testcasesperABA[aba].items() :
    #         for testcase in testcases:
    #             rallyUtil.add_testcasetotestset(testsetID, testcase)

    for testcase in testcasesperABA:
        rallyUtil.add_testcasetotestset(testsetID, testcase)
示例#7
0
    workspace = config['rally']['workspace']
    project = config['rally']['project']


    branch = config['testInfOnGit']['branch']
    aba_list = config['testInfOnGit']['aba_list']
    aba_list = parsestringtolist(aba_list)
    levels = parsestringtolist(config['testInfOnGit']['levels'])
    GIT_USER = config['testInfOnGit']['GIT_USER']
    GIT_PWD = config['testInfOnGit']['GIT_PWD']
    GITHUB_URL = config['testInfOnGit']['GITHUB_URL']

    testsetID = config['testset']['testsetID']


    rallyUtil = RallyUtil()
    ident_query = 'FormattedID = "{}"'.format(testsetID)
    testset = rallyUtil.rally.get('TestSet', fetch=True, query=ident_query,
                                 workspace=workspace, project=project)


    testset = next(testset, None)
    testcases = rallyUtil.get_testcases_from_testset(testsetID)

    for testcase in testcases:
        print("handle case", testcase.FormattedID)
        if not testcase.LastResult:
            continue
        ident_query = 'oid = "{}"'.format(testcase.LastResult.oid)
        result = rallyUtil.rally.get('TestCaseResult', fetch=True, query=ident_query,
                   workspace=workspace, project=project)
# import RallyUtil
from example import RallyUtil

#################################################################################################
#################################################################################################

if __name__ == '__main__':
    apikey = "_y0jdQIdhTSmCZ1PuzwmeGW1mYWee5UMNsFwUmFuVsEA"
    server = "rally1.rallydev.com"
    username = "******"
    password = ""
    workspace = "MicroStrategy Workspace"
    project = "SR-Intelligence-Kernel"

    rallyUtil = RallyUtil()

    entity_name, ident = ("TestCase", "TF7360")
    ident_query = 'TestFolder.FormattedID = "%s"' % ident
    response = rallyUtil.rally.get(entity_name,
                                   fetch=True,
                                   query=ident_query,
                                   workspace=workspace,
                                   project=project)

    excelname = 'testcaseSteps.xlsx'
    scenarios = retrieveTestcaseResultFromSheet(excelname)

    for testcase in response:
        testcaseID = testcase.FormattedID
        if testcaseID == "TC49577":
示例#9
0
        7.7,
        7.6
    }
}
osList = ["Microsoft Windows Server","Amazon Linux","Red Hat Enterprise Linux"]
#################################################################################################

if __name__ == '__main__' :
    apikey = "_y0jdQIdhTSmCZ1PuzwmeGW1mYWee5UMNsFwUmFuVsEA"
    server = "rally1.rallydev.com"
    username = "******"
    password = ""
    workspace = "MicroStrategy Workspace"
    project = "SR-Intelligence-Kernel"

    rallyUtil = RallyUtil()

    excelname = 'xlsx_updateTestCaseDiscussion.xlsx'
    testcasesList = retrieveTestcaseResultFromSheet(excelname)
    oldrelease = 'GA'
    newrelease = ''

    for testcaseRow in testcasesList:
        for testset_id, info in testcaseRow.items():
            rallyUtil.remove_testset(testset_id, osList)
            # rallyUtil.update_testset_name(testset_id, oldrelease, newrelease)


    print("done")
    # main(sys.argv[1 :])
示例#10
0
logger.addHandler(fh)
logger.addHandler(ch)

#################################################################################################
#################################################################################################

if __name__ == '__main__':
    apikey = "_y0jdQIdhTSmCZ1PuzwmeGW1mYWee5UMNsFwUmFuVsEA"
    server = "rally1.rallydev.com"
    username = "******"
    password = ""
    workspace = "MicroStrategy Workspace"
    project = "SR-Intelligence-Kernel"

    rallyUtil = RallyUtil()

    excelname = 'testcase.xlsx'
    testcasesList = retrieveTestcaseResultFromSheet(excelname)

    for testcaseRow in testcasesList:
        for defectID, testcase_json in testcaseRow.items():
            print(defectID)
            # testcaseID = 'TC8818'
            # ident_query1 = 'FormattedID = "%s"' % testcaseID
            # ident_query_1 = 'FormattedID = "{}"'.format(testcaseID)
            # testcaseResponse = rallyUtil.rally.get('TestCase', fetch=True, query=ident_query1,
            #                                      workspace=workspace, project=project)
            # defectID='DE32108'
            ident_query = 'FormattedID = "%s"' % defectID
            ident_query_ = 'FormattedID = "{}"'.format(defectID)
示例#11
0
    coloredlogs.install()
    logging.addLevelName(
        logging.WARNING,
        "\033[1;31m%s\033[1;0m" % logging.getLevelName(logging.WARNING))
    logging.addLevelName(
        logging.ERROR,
        "\033[1;41m%s\033[1;0m" % logging.getLevelName(logging.ERROR))
    apikey = "_y0jdQIdhTSmCZ1PuzwmeGW1mYWee5UMNsFwUmFuVsEA"
    server = "rally1.rallydev.com"
    username = "******"
    password = ""
    workspace = "MicroStrategy Workspace"
    project = "SR-Intelligence-Kernel"

    rallyUtil = RallyUtil()

    excelname = 'reviewtestcase.xlsx'
    # testcasesList = retrieveTestcaseResultFromSheet(excelname)

    start_time = datetime.now()

    # testsetNames = [
    #     "F28343: Function test",
    #     "F28343: Performance test",
    #     "F28343: Stability test"
    # ]
    # testTypes = [
    #     'Functional',
    #     'Performance',
    #     'Stability'