|
83 | 83 | NEWPROJECT="NEW_PROJECT_API-%i" % projNr
|
84 | 84 | NEWPREFIX="NPROAPI%i" % projNr
|
85 | 85 | NEWTESTPLAN="TestPlan_API"
|
| 86 | +NEWPLATFORM_A='Big Birds %i' % projNr |
| 87 | +NEWPLATFORM_B='Small Birds' |
| 88 | +NEWPLATFORM_C='Ugly Birds' |
86 | 89 | NEWTESTSUITE_A="A - First Level"
|
87 | 90 | NEWTESTSUITE_B="B - First Level"
|
88 | 91 | NEWTESTSUITE_AA="AA - Second Level"
|
|
163 | 166 | print "New Test Plan '%s' - id: %s" % (NEWTESTPLAN,newTestPlanID)
|
164 | 167 | # -- END CHANGE v0.4.5 --
|
165 | 168 |
|
| 169 | +# -- Start NEW v0.4.6 -- |
| 170 | +# Create platform 'Big Birds x' |
| 171 | +newPlatForm = myTestLink.createPlatform(NEWPROJECT, NEWPLATFORM_A, |
| 172 | + notes='Platform for Big Birds, unique name, only used in this project') |
| 173 | +print "createPlatform", newPlatForm |
| 174 | +newPlatFormID_A = newPlatForm['id'] |
| 175 | +# Add Platform 'Big Bird x' to platform |
| 176 | +response = myTestLink.addPlatformToTestPlan(newTestPlanID, NEWPLATFORM_A) |
| 177 | +print "addPlatformToTestPlan", response |
| 178 | + |
| 179 | +# Create platform 'Small Birds' |
| 180 | +newPlatForm = myTestLink.createPlatform(NEWPROJECT, NEWPLATFORM_B, |
| 181 | + notes='Platform for Small Birds, name used in all example projects') |
| 182 | +print "createPlatform", newPlatForm |
| 183 | +newPlatFormID_B = newPlatForm['id'] |
| 184 | +# Add Platform 'Small Bird' to platform |
| 185 | +response = myTestLink.addPlatformToTestPlan(newTestPlanID, NEWPLATFORM_B) |
| 186 | +print "addPlatformToTestPlan", response |
| 187 | + |
| 188 | +# Create platform 'Ugly Birds' |
| 189 | +newPlatForm = myTestLink.createPlatform(NEWPROJECT, NEWPLATFORM_C, |
| 190 | + notes='Platform for Ugly Birds, will be removed from test plan') |
| 191 | +print "createPlatform", newPlatForm |
| 192 | +newPlatFormID_C = newPlatForm['id'] |
| 193 | +# Add Platform 'Ugly Bird' to platform |
| 194 | +response = myTestLink.addPlatformToTestPlan(newTestPlanID, NEWPLATFORM_C) |
| 195 | +print "addPlatformToTestPlan", response |
| 196 | +# -- End NEW v0.4.6 -- |
| 197 | + |
166 | 198 | #Creates the test Suite A
|
167 | 199 | newTestSuite = myTestLink.createTestSuite(newProjectID, NEWTESTSUITE_A,
|
168 | 200 | "Details of the Test Suite A")
|
|
274 | 306 | # -- New Examples with v0.4.5 --
|
275 | 307 |
|
276 | 308 | # Add test cases to test plan - we need the full external id !
|
| 309 | +# TC AA should be tested with platforms 'Big Birds'+'Small Birds' |
277 | 310 | tc_aa_full_ext_id = myTestLink.getTestCase(newTestCaseID_AA)[0]['full_tc_external_id']
|
278 | 311 | response = myTestLink.callServerWithPosArgs('addTestCaseToTestPlan',
|
279 | 312 | devKey=myTestLink.devKey, testprojectid=newProjectID,
|
280 | 313 | testplanid=newTestPlanID, testcaseexternalid=tc_aa_full_ext_id,
|
281 |
| - version=1) |
| 314 | + platformid=newPlatFormID_A,version=1) |
282 | 315 | print "addTestCaseToTestPlan", response
|
| 316 | +tc_aa_full_ext_id = myTestLink.getTestCase(newTestCaseID_AA)[0]['full_tc_external_id'] |
| 317 | +response = myTestLink.callServerWithPosArgs('addTestCaseToTestPlan', |
| 318 | + devKey=myTestLink.devKey, testprojectid=newProjectID, |
| 319 | + testplanid=newTestPlanID, testcaseexternalid=tc_aa_full_ext_id, |
| 320 | + platformid=newPlatFormID_B,version=1) |
| 321 | +print "addTestCaseToTestPlan", response |
| 322 | +# TC B should be tested with platform 'Small Birds' |
283 | 323 | tc_b_full_ext_id = myTestLink.getTestCase(testcaseid=newTestCaseID_B)[0]['full_tc_external_id']
|
284 | 324 | response = myTestLink.callServerWithPosArgs('addTestCaseToTestPlan',
|
285 | 325 | devKey=myTestLink.devKey, testprojectid=newProjectID,
|
286 | 326 | testplanid=newTestPlanID, testcaseexternalid=tc_b_full_ext_id,
|
287 |
| - version=1) |
| 327 | + platformid=newPlatFormID_B,version=1) |
288 | 328 | print "addTestCaseToTestPlan", response
|
| 329 | + |
| 330 | +# # Try to Remove Platform 'Big Birds' from platform |
| 331 | +# response = myTestLink.removePlatformFromTestPlan(newTestPlanID, NEWPLATFORM_C) |
| 332 | +# print "removePlatformFromTestPlan", response |
| 333 | + |
| 334 | +# Remove Platform 'Ugly Birds' from platform |
| 335 | +response = myTestLink.removePlatformFromTestPlan(newTestPlanID, NEWPLATFORM_C) |
| 336 | +print "removePlatformFromTestPlan", response |
289 | 337 |
|
290 | 338 | # -- Create Build
|
291 | 339 | newBuild = myTestLink.createBuild(newTestPlanID, NEWBUILD, 'Notes for the Build')
|
292 | 340 | print "createBuild", newBuild
|
293 | 341 | newBuildID = newBuild[0]['id']
|
294 | 342 | print "New Build '%s' - id: %s" % (NEWBUILD, newBuildID)
|
295 | 343 |
|
296 |
| -# report Test Case Results |
| 344 | +# report Test Case Results for platform 'Big Bird' |
297 | 345 | # TC_AA failed, build should be guessed, TC identified with external id
|
298 | 346 | newResult = myTestLink.reportTCResult(None, newTestPlanID, None, 'f', '', guess=True,
|
299 |
| - testcaseexternalid=tc_aa_full_ext_id) |
| 347 | + testcaseexternalid=tc_aa_full_ext_id, |
| 348 | + platformname=NEWPLATFORM_A) |
300 | 349 | print "reportTCResult", newResult
|
301 | 350 | newResultID_AA = newResult[0]['id']
|
| 351 | +# report Test Case Results for platform 'Small Bird' |
| 352 | +# TC_AA passed, build should be guessed, TC identified with external id |
| 353 | +newResult = myTestLink.reportTCResult(None, newTestPlanID, None, 'p', '', guess=True, |
| 354 | + testcaseexternalid=tc_aa_full_ext_id, |
| 355 | + platformname=NEWPLATFORM_B) |
| 356 | +print "reportTCResult", newResult |
| 357 | +newResultID_AA_p = newResult[0]['id'] |
302 | 358 | # TC_B passed, explicit build and some notes , TC identified with internal id
|
303 | 359 | newResult = myTestLink.reportTCResult(newTestCaseID_B, newTestPlanID, NEWBUILD,
|
304 |
| - 'p', 'first try') |
| 360 | + 'p', 'first try', platformname=NEWPLATFORM_B) |
305 | 361 | print "reportTCResult", newResult
|
306 | 362 | newResultID_B = newResult[0]['id']
|
307 | 363 |
|
|
0 commit comments