Changes between Version 14 and Version 15 of TestManagerForTracPluginRPCApi
- Timestamp:
- Dec 14, 2014, 10:37:49 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TestManagerForTracPluginRPCApi
v14 v15 46 46 For documentation about each test object's properties, 47 47 refer to the [wiki:TestManagerForTracPluginPythonApi Python API]. 48 [wiki:TestManagerForTracPlugin#Customfields Custom fields] ARE supported. 48 49 Returns True if successful, False otherwise. 49 50 … … 119 120 # trac_project_url = "http://anonymous@localhost:8000/my_test_project/rpc" 120 121 # 121 trac_project_url = "http://user@yourserver:port/yourproject/rpc" 122 123 print ">> Connecting to '%s'" % trac_project_url 122 # trac_project_url = "http://user@yourserver:port/yourproject/rpc" 123 trac_project_url = "http://anonymous@localhost:8000/test01/rpc" 124 125 print "" 126 print "-------- Connecting to '%s'" % trac_project_url 127 print "" 128 124 129 server = xmlrpclib.ServerProxy(trac_project_url) 125 130 … … 130 135 131 136 print ">> Creating sub-catalog" 132 sub_cat = server.testmanager.createTestCatalog(root_cat, "Test Sub-Catalog RPC", "This is a wonderful sub-catalog." )137 sub_cat = server.testmanager.createTestCatalog(root_cat, "Test Sub-Catalog RPC", "This is a wonderful sub-catalog.", {'remarks': 'These are the Remarks'}) 133 138 print sub_cat 134 139 135 140 print ">> Creating two test cases in the root catalog" 136 tc_1 = server.testmanager.createTestCase(root_cat, "Test Case 1", "This is a wonderful test case." )141 tc_1 = server.testmanager.createTestCase(root_cat, "Test Case 1", "This is a wonderful test case.", {'component': 'Framework'}) 137 142 print tc_1 138 tc_2 = server.testmanager.createTestCase(root_cat, "Test Case 2", "This is an even more wonderful test case." )143 tc_2 = server.testmanager.createTestCase(root_cat, "Test Case 2", "This is an even more wonderful test case.", {'testeffort': '1000'}) 139 144 print tc_2 140 145 … … 145 150 print tc_4 146 151 152 print ">> Listing root-level catalogs" 153 for tc in server.testmanager.listRootCatalogs(): 154 for v in tc: 155 print v 156 147 157 print ">> Listing sub-catalogs of root test catalog" 148 158 for tc in server.testmanager.listSubCatalogs(root_cat): … … 156 166 157 167 print ">> Creating a test plan on the root catalog" 158 tplan = server.testmanager.createTestPlan(root_cat, "Test Root Plan RPC" )168 tplan = server.testmanager.createTestPlan(root_cat, "Test Root Plan RPC", {'longdescription': 'This is a veeeeeery long description.'}) 159 169 print tplan 160 170 161 171 print ">> Listing test plans available on specified test catalog" 162 for tp in server.testmanager.listTestPlans( '0'):172 for tp in server.testmanager.listTestPlans(root_cat): 163 173 for v in tp: 164 174 print v … … 186 196 print ">> Getting test plan on root catalog properties" 187 197 for v in server.testmanager.getTestPlan(tplan, root_cat): 198 print v 199 200 print ">> Verifying root test catalog properties has been changed" 201 for v in server.testmanager.getTestCatalog(root_cat): 188 202 print v 189 203 … … 248 262 printPlan(root_cat, tplan) 249 263 250 print ">> Setting test case status "264 print ">> Setting test case status (note: this actually creates the TestCaseInPlan object into the DB)" 251 265 print server.testmanager.setTestCaseStatus(tc_2, tplan, 'successful') 252 266 … … 258 272 print server.testmanager.setTestCaseStatus(tc_2, tplan, 'failed') 259 273 260 print ">> Verifying the test case status has been changed" 274 print ">> Modifying test case in plan custom field" 275 print server.testmanager.modifyTestObject('testcaseinplan', tc_2, {'planid': tplan, 'operating_system': "Macosx"}) 276 277 print ">> Verifying the test case status and custom field have been changed" 261 278 for v in server.testmanager.getTestCase(tc_2, tplan): 262 279 print v … … 264 281 print ">> Printing again complete test plan tree, showing modified test case status" 265 282 printPlan(root_cat, tplan) 266 267 283 }}}