Exemplo n.º 1
0
Arquivo: main.py Projeto: Anton-Sl/QC
    u'vc-date': None
}
client.UpdateEntity("tests", a, 214)
print(client.GetTestByName('Test1'))
print(client.GetRuns())
print(client.GetRuns(410))
print(client.GetTestConfigs(214))
print(client.GetTestConfigById(1216))
print(client.GetTestParameters(214))
print(client.GetTestSetByName("Validation"))
print(client.GetTestSetFoldersById(10))
print(client.GetTestSetById(308))
print(client.GetTestSetByParentId(26))
print(client.GetTestSetFoldersByParentId(9))
print(client.GetReleaseCyclesByDates(1001, "2018-07-25", "2034-07-25"))
print(client.GetTestInstances(308))
print(client.GetTestInstances())
print(client.GetMandatoryFields("runs"))
print(client.GetMandatoryFields("tests"))
print(client.GetMandatoryFields("test-configs"))
print(client.GetMandatoryFields("test-sets"))
print(client.GetMandatoryFields("test-configs"))
print(client.GetMandatoryFields("test-set-folders"))
print(client.GetMandatoryFields("test-instances"))
print(client.GetMandatoryFields("release-cycles"))
print(client.GetMandatoryFields("defects"))

cc = TestSet("FirstSet1")
print(client.CreateEntity("test-sets", cc))

cc = TestInstance(testId=214, cycleId=0)
Exemplo n.º 2
0
Arquivo: main.py Projeto: boyolya/QC
testAnswer = connector.GetTestByName('Test1')
print("GetTestByName = ", testAnswer)
testId = testAnswer[0]['id']

answer = connector.GetTestConfigs(testId)
print("GetTestConfigs = ", answer)
print("GetTestConfigById = ", connector.GetTestConfigById(answer[0]['id']))
print("GetTestParameters = ", connector.GetTestParameters(testId))

cc = TestInstance(testId=testId, cycleId=0)
answer = connector.CreateTestInstance(cc)
testInstanceId = answer[0]['id']
print("CreateTestInstance = ", answer)
print(
    "UpdateTestInstance = ",
    connector.UpdateTestInstance(testInstanceId=testInstanceId,
                                 paramsToUpdate={'status': 'Passed'}))

print("GetTestInstances = ", connector.GetTestInstances(testId=testId))

r = Run('MyRun', testId, testInstanceId, 'policherti_gmail.com')
answer = connector.CreateTestRun(run=r,
                                 status=Status.PASSED,
                                 instanceDataToUpdate={'': ''})
print("CreateTestRun = ", answer)
print("GetRuns = ", connector.GetRuns(answer[0]['id']))

print("GetReleaseCyclesByDates = ",
      connector.GetReleaseCyclesByDates("1001", "2018-07-25", "2018-07-26"))
print("Logout = ", connector.Logout())