|
109 | 109 | myTLVersion = myTestLink.testLinkVersion()
|
110 | 110 |
|
111 | 111 | # used connection settings
|
112 |
| -print myTestLink.connectionInfo() |
113 |
| -print "" |
| 112 | +print( myTestLink.connectionInfo() ) |
| 113 | +print( "" ) |
114 | 114 |
|
115 | 115 | # get information - TestProject
|
116 | 116 | newProject = myTestLink.getTestProjectByName(NEWPROJECT)
|
117 |
| -print "getTestProjectByName", newProject |
| 117 | +print( "getTestProjectByName", newProject ) |
118 | 118 | newProjectID = newProject['id']
|
119 |
| -print "Project '%s' - id: %s" % (NEWPROJECT,newProjectID) |
| 119 | +print( "Project '%s' - id: %s" % (NEWPROJECT,newProjectID) ) |
| 120 | +response = myTestLink.getProjectKeywords(newProjectID) |
| 121 | +print("getProjectKeywords", response) |
120 | 122 |
|
121 | 123 | # get information - TestPlan
|
122 | 124 | newTestPlan = myTestLink.getTestPlanByName(NEWPROJECT, NEWTESTPLAN_A)
|
123 |
| -print "getTestPlanByName", newTestPlan |
| 125 | +print( "getTestPlanByName", newTestPlan ) |
124 | 126 | newTestPlanID_A = newTestPlan[0]['id']
|
125 |
| -print "Test Plan '%s' - id: %s" % (NEWTESTPLAN_A,newTestPlanID_A) |
| 127 | +print( "Test Plan '%s' - id: %s" % (NEWTESTPLAN_A,newTestPlanID_A) ) |
126 | 128 | response = myTestLink.getTotalsForTestPlan(newTestPlanID_A)
|
127 |
| -print "getTotalsForTestPlan", response |
| 129 | +print( "getTotalsForTestPlan", response ) |
128 | 130 | response = myTestLink.getBuildsForTestPlan(newTestPlanID_A)
|
129 |
| -print "getBuildsForTestPlan", response |
| 131 | +print( "getBuildsForTestPlan", response ) |
130 | 132 | newBuildID_A = response[0]['id']
|
131 | 133 | newBuildName_A = response[0]['name']
|
132 | 134 | # get information - TestSuite
|
133 | 135 | response = myTestLink.getTestSuitesForTestPlan(newTestPlanID_A)
|
134 |
| -print "getTestSuitesForTestPlan", response |
| 136 | +print( "getTestSuitesForTestPlan", response ) |
135 | 137 | newTestSuiteID_A=response[0]['id']
|
136 | 138 | newTestSuiteID_AA=response[1]['id']
|
137 | 139 | newTestSuiteID_B=response[2]['id']
|
138 | 140 | newTestSuite = myTestLink.getTestSuiteByID(newTestSuiteID_B)
|
139 |
| -print "getTestSuiteByID", newTestSuite |
| 141 | +print( "getTestSuiteByID", newTestSuite ) |
140 | 142 |
|
141 | 143 | # list test cases with assigned keywords
|
142 | 144 | response = myTestLink.getTestCasesForTestSuite(newTestSuiteID_B, True,
|
143 | 145 | 'full', getkeywords=True)
|
144 |
| -print "getTestCasesForTestSuite (deep=True)", response |
| 146 | +print( "getTestCasesForTestSuite (deep=True)", response ) |
145 | 147 | response = myTestLink.getTestCasesForTestSuite(newTestSuiteID_B, False,
|
146 | 148 | 'full', getkeywords=True)
|
147 |
| -print "getTestCasesForTestSuite (deep=False)", response |
| 149 | +print( "getTestCasesForTestSuite (deep=False)", response ) |
148 | 150 |
|
149 | 151 | # get informationen - TestCase_B
|
150 | 152 | response = myTestLink.getTestCaseIDByName(NEWTESTCASE_B, testprojectname=NEWPROJECT)
|
151 |
| -print "getTestCaseIDByName", response |
| 153 | +print( "getTestCaseIDByName", response ) |
152 | 154 | newTestCaseID_B = response[0]['id']
|
153 |
| -print "Test Case '%s' - id: %s" % (NEWTESTCASE_B, newTestCaseID_B) |
| 155 | +print( "Test Case '%s' - id: %s" % (NEWTESTCASE_B, newTestCaseID_B) ) |
154 | 156 | newTestCase_B = myTestLink.getTestCase(testcaseid=newTestCaseID_B)[0]
|
155 |
| -print "getTestCase", newTestCase_B |
| 157 | +print( "getTestCase", newTestCase_B ) |
156 | 158 |
|
157 | 159 | # return keyword list for TestCase_B
|
158 | 160 | response = myTestLink.listKeywordsForTC(newTestCaseID_B)
|
159 |
| -print "listKeywordsForTC", response |
| 161 | +print( "listKeywordsForTC", response ) |
160 | 162 | # return keyword lists for all test cases of test newTestSuite_B
|
161 | 163 | response = myTestLink.listKeywordsForTS(newTestSuiteID_B)
|
162 |
| -print "listKeywordsForTS", response |
| 164 | +print( "listKeywordsForTS", response ) |
163 | 165 |
|
164 | 166 | # new execution result with custom field data
|
165 | 167 | # TC_B passed, explicit build and some notes , TC identified with internal id
|
|
168 | 170 | platformname=NEWPLATFORM_B, bugid='4711',
|
169 | 171 | customfields={'cf_tc_ex_string' : 'a custom exec value set via api',
|
170 | 172 | 'cf_tc_sd_listen' : 'ernie'})
|
171 |
| -print "reportTCResult", newResult |
| 173 | +print( "reportTCResult", newResult ) |
172 | 174 |
|
173 | 175 | # get execution results
|
174 | 176 | lastResult = myTestLink.getLastExecutionResult(newTestPlanID_A, newTestCaseID_B,
|
175 | 177 | options={'getBugs' : True})[0]
|
176 |
| -print "getLastExecutionResult", lastResult |
| 178 | +print( "getLastExecutionResult", lastResult ) |
177 | 179 |
|
178 | 180 | # map of used ids
|
179 | 181 | args = {'devKey' : myTestLink.devKey,
|
|
192 | 194 | response = myTestLink.getTestCaseCustomFieldExecutionValue(
|
193 | 195 | 'cf_tc_ex_string', args['testprojectid'], args['tcversion_id'],
|
194 | 196 | args['executionid'] , args['testplanid'] )
|
195 |
| -print "getTestCaseCustomFieldExecutionValue", response |
| 197 | +print( "getTestCaseCustomFieldExecutionValue", response ) |
196 | 198 |
|
197 | 199 | # update CustomField Value - TestCase SpecDesign
|
198 | 200 | response = myTestLink.updateTestCaseCustomFieldDesignValue(
|
199 | 201 | args['testcaseexternalid'], args['version'],
|
200 | 202 | args['testprojectid'],
|
201 | 203 | {'cf_tc_sd_string' : 'A custom SpecDesign value set via api',
|
202 | 204 | 'cf_tc_sd_list' : 'bibo'})
|
203 |
| -print "updateTestCaseCustomFieldDesignValue", response |
| 205 | +print( "updateTestCaseCustomFieldDesignValue", response ) |
204 | 206 |
|
205 | 207 | # get CustomField Value - TestCase SpecDesign
|
206 | 208 | #response = myTestLink._callServer('getTestCaseCustomFieldDesignValue', args)
|
207 | 209 | response = myTestLink.getTestCaseCustomFieldDesignValue(
|
208 | 210 | args['testcaseexternalid'], args['version'],
|
209 | 211 | args['testprojectid'], 'cf_tc_sd_string', 'full')
|
210 |
| -print "getTestCaseCustomFieldDesignValue full", response |
| 212 | +print( "getTestCaseCustomFieldDesignValue full", response ) |
211 | 213 |
|
212 | 214 | response = myTestLink.getTestCaseCustomFieldDesignValue(
|
213 | 215 | args['testcaseexternalid'], args['version'],
|
214 | 216 | args['testprojectid'], 'cf_tc_sd_string', 'value')
|
215 |
| -print "getTestCaseCustomFieldDesignValue value", response |
| 217 | +print( "getTestCaseCustomFieldDesignValue value", response ) |
216 | 218 |
|
217 | 219 | response = myTestLink.getTestCaseCustomFieldDesignValue(
|
218 | 220 | args['testcaseexternalid'], args['version'],
|
219 | 221 | args['testprojectid'], 'cf_tc_sd_list', 'simple')
|
220 |
| -print "getTestCaseCustomFieldDesignValue simple", response |
| 222 | +print( "getTestCaseCustomFieldDesignValue simple", response ) |
221 | 223 |
|
222 | 224 | # get CustomField Value - TestCase Testplan Design
|
223 | 225 | response = myTestLink.getTestCaseCustomFieldTestPlanDesignValue(
|
224 | 226 | 'cf_tc_pd_string', args['testprojectid'], args['tcversion_id'],
|
225 | 227 | args['testplanid'], args['linkid'])
|
226 |
| -print "getTestCaseCustomFieldTestPlanDesignValue", response |
| 228 | +print( "getTestCaseCustomFieldTestPlanDesignValue", response ) |
227 | 229 |
|
228 | 230 | # get CustomField Value - TestSuite
|
229 | 231 | response = myTestLink.getTestSuiteCustomFieldDesignValue(
|
230 | 232 | 'cf_ts_string', args['testprojectid'], args['testsuiteid'])
|
231 |
| -print "getTestSuiteCustomFieldDesignValue", response |
| 233 | +print( "getTestSuiteCustomFieldDesignValue", response ) |
232 | 234 |
|
233 | 235 | # get CustomField Value - TestPlan
|
234 | 236 | response = myTestLink.getTestPlanCustomFieldDesignValue(
|
235 | 237 | 'cf_tp_string', args['testprojectid'], args['testplanid'])
|
236 |
| -print "getTestPlanCustomFieldDesignValue", response |
| 238 | +print( "getTestPlanCustomFieldDesignValue", response ) |
237 | 239 |
|
238 | 240 | # get CustomField Value - Requirement Specification
|
239 | 241 | response = myTestLink.getReqSpecCustomFieldDesignValue(
|
240 | 242 | 'cf_req_sd_string', args['testprojectid'], args['reqspecid'])
|
241 |
| -print "getReqSpecCustomFieldDesignValue", response |
| 243 | +print( "getReqSpecCustomFieldDesignValue", response ) |
242 | 244 |
|
243 | 245 |
|
244 | 246 | # get CustomField Value - Requirement Specification
|
245 | 247 | response = myTestLink.getRequirementCustomFieldDesignValue(
|
246 | 248 | 'cf_req_string',args['testprojectid'], args['requirementid'])
|
247 |
| -print "getRequirementCustomFieldDesignValue", response |
| 249 | +print( "getRequirementCustomFieldDesignValue", response ) |
0 commit comments