|
54 | 54 | - testplan - testcase link
|
55 | 55 | could be requested via api, these example does not work currently.
|
56 | 56 |
|
57 |
| -Script returns keywords from test case TESTCASE_B, if the user has assigned |
58 |
| -manually some values. |
| 57 | +Script adds keywords KeyWord01 KeyWord02 KeyWord03 to test case TESTCASE_B |
| 58 | +and returns the resulting keyword list |
59 | 59 |
|
60 | 60 | """
|
61 | 61 | from testlink import TestlinkAPIClient, TestLinkHelper
|
|
139 | 139 | newTestSuiteID_B=response[2]['id']
|
140 | 140 | newTestSuite = myTestLink.getTestSuiteByID(newTestSuiteID_B)
|
141 | 141 | print( "getTestSuiteByID", newTestSuite )
|
| 142 | +# get informationen - TestCase_B |
| 143 | +response = myTestLink.getTestCaseIDByName(NEWTESTCASE_B, testprojectname=NEWPROJECT) |
| 144 | +print( "getTestCaseIDByName", response ) |
| 145 | +newTestCaseID_B = response[0]['id'] |
| 146 | +tc_b_full_ext_id = myTestLink.getTestCase(newTestCaseID_B)[0]['full_tc_external_id'] |
| 147 | +print( "Test Case '%s' - id: %s - ext-id %s" % (NEWTESTCASE_B, newTestCaseID_B, tc_b_full_ext_id) ) |
| 148 | +# add keywords to TestCase B |
| 149 | +response = myTestLink.addTestCaseKeywords(tc_b_full_ext_id, |
| 150 | + ['KeyWord01', 'KeyWord03', 'KeyWord02']) |
| 151 | +print( "addTestCaseKeywords", response ) |
| 152 | + |
142 | 153 |
|
143 | 154 | # list test cases with assigned keywords
|
144 | 155 | response = myTestLink.getTestCasesForTestSuite(newTestSuiteID_B, True,
|
|
148 | 159 | 'full', getkeywords=True)
|
149 | 160 | print( "getTestCasesForTestSuite (deep=False)", response )
|
150 | 161 |
|
151 |
| -# get informationen - TestCase_B |
152 |
| -response = myTestLink.getTestCaseIDByName(NEWTESTCASE_B, testprojectname=NEWPROJECT) |
153 |
| -print( "getTestCaseIDByName", response ) |
154 |
| -newTestCaseID_B = response[0]['id'] |
155 |
| -print( "Test Case '%s' - id: %s" % (NEWTESTCASE_B, newTestCaseID_B) ) |
| 162 | +# get informationen - TestCase_B again |
156 | 163 | newTestCase_B = myTestLink.getTestCase(testcaseid=newTestCaseID_B)[0]
|
157 | 164 | print( "getTestCase", newTestCase_B )
|
158 | 165 |
|
|
0 commit comments