Changes between Version 17 and Version 18 of TestManagerForTracPluginRPCApi
- Timestamp:
- Jun 12, 2015, 11:54:49 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TestManagerForTracPluginRPCApi
v17 v18 1 1 ''' [ [wiki:TestManagerForTracPlugin Home] | [wiki:TestManagerForTracPluginChangeHistory Latest changes] | [wiki:TestManagerForTracPluginGallery Image gallery] | [http://www.youtube.com/watch?v=BIi3QMT0rT4 Video tutorial on Youtube] | [wiki:TestManagerForTracPluginQuickSetup Quick setup guide] | [http://sourceforge.net/projects/testman4trac Download] | [http://sourceforge.net/projects/testman4trac/files Source] | [wiki:TestManagerForTracPluginBugsFeatures Bugs/Feature requests] ]''' 2 2 3 = Test Manager for Trac Plugin - The XML-RPC API = 4 5 [[BR]] 3 = Test Manager for Trac Plugin - The XML-RPC API 4 6 5 The [wiki:TestManagerForTracPlugin TestManager plugin] can be used programmatically to create and manage Test Catalogs, Test Cases and Test Plans, and to set the test execution verdicts of Test Cases in a plan. 7 6 … … 15 14 This API is present in the [wiki:TestManagerForTracPlugin TestManager plugin] since rel. 1.4.3. 16 15 17 [[BR]] 18 == The exported functions == 16 == The exported functions 19 17 20 18 [[BR]]'''createTestCatalog'''(parent_catalog_id, title, description)[[BR]] … … 101 99 (testcase_id, wiki_page_name, status) 102 100 103 [[BR]] 104 [[BR]] 105 == Examples == 101 == Examples 106 102 107 103 This section presents a set of usage examples for this RPC API. 108 104 109 105 Just copy this code and paste into a file named {{{rpc_example.py}}}, '''adapt the initial URL to point to your server, port and project''', and run it from a command line with {{{python rpc_example.py}}}. 110 [[BR]] 111 112 {{{ 106 107 {{{#!python 113 108 import xmlrpclib 114 109 … … 121 116 # 122 117 # trac_project_url = "http://user@yourserver:port/yourproject/rpc" 118 123 119 trac_project_url = "http://anonymous@localhost:8000/test01/rpc" 124 120 … … 128 124 129 125 server = xmlrpclib.ServerProxy(trac_project_url) 130 131 126 132 127 print ">> Creating test catalog" … … 207 202 208 203 # Recursive function to print a whole sub-catalog and its contained test cases 204 209 205 def printSubCatalog(cat_id, indent): 210 206 tcat = server.testmanager.getTestCatalog(cat_id) … … 225 221 226 222 # Recursive function to print a whole sub-plan and its contained test cases with status 223 227 224 def printSubPlan(cat_id, plan_id, indent): 228 225 tcat = server.testmanager.getTestCatalog(cat_id) … … 246 243 247 244 # Entry point to print a whole test plan and its contained test cases with status 245 248 246 def printPlan(cat_id, plan_id): 249 247 p = server.testmanager.getTestPlan(plan_id, cat_id)