Changes between Version 17 and Version 18 of TestManagerForTracPluginRPCApi


Ignore:
Timestamp:
Jun 12, 2015, 11:54:49 AM (6 years ago)
Author:
figaro
Comment:

Cosmetic changes, tagged with 'testing'

Legend:

Unmodified
Added
Removed
Modified
  • TestManagerForTracPluginRPCApi

    v17 v18  
    11''' [ [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] ]'''
    22
    3 = Test Manager for Trac Plugin - The XML-RPC API =
    4 
    5 [[BR]]
     3= Test Manager for Trac Plugin - The XML-RPC API
     4
    65The [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.
    76
     
    1514This API is present in the [wiki:TestManagerForTracPlugin TestManager plugin] since rel. 1.4.3.
    1615
    17 [[BR]]
    18 == The exported functions ==
     16== The exported functions
    1917
    2018[[BR]]'''createTestCatalog'''(parent_catalog_id, title, description)[[BR]]
     
    10199                        (testcase_id, wiki_page_name, status)
    102100
    103 [[BR]]
    104 [[BR]]
    105 == Examples ==
     101== Examples
    106102
    107103This section presents a set of usage examples for this RPC API.
    108104
    109105Just 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
    113108import xmlrpclib
    114109
     
    121116#
    122117# trac_project_url = "http://user@yourserver:port/yourproject/rpc"
     118
    123119trac_project_url = "http://anonymous@localhost:8000/test01/rpc"
    124120
     
    128124
    129125server = xmlrpclib.ServerProxy(trac_project_url)
    130 
    131126
    132127print ">> Creating test catalog"
     
    207202
    208203# Recursive function to print a whole sub-catalog and its contained test cases
     204
    209205def printSubCatalog(cat_id, indent):
    210206    tcat = server.testmanager.getTestCatalog(cat_id)
     
    225221
    226222# Recursive function to print a whole sub-plan and its contained test cases with status
     223
    227224def printSubPlan(cat_id, plan_id, indent):
    228225    tcat = server.testmanager.getTestCatalog(cat_id)
     
    246243
    247244# Entry point to print a whole test plan and its contained test cases with status
     245
    248246def printPlan(cat_id, plan_id):
    249247    p = server.testmanager.getTestPlan(plan_id, cat_id)