Changes between Version 4 and Version 5 of TestManagerForTracPluginWorkflow


Ignore:
Timestamp:
Oct 9, 2010, 2:54:06 PM (13 years ago)
Author:
Roberto Longobardi
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TestManagerForTracPluginWorkflow

    v4 v5  
    88
    99
    10 == How to implement Workflow on Test Cases ==
     10== Example: How to implement Workflow on Test Cases ==
    1111
    1212The following is a cookbook to implement Workflow on Test Cases.
    1313
    14 === 1) Declare the desired workflow steps ===
    15 
    16 First thing to do is to define the "state machine". Think of it as the definition of the steps your artifacts should go through in their transitions between a state and another.
     14All is required it to define the desired workflow steps, a.k.a. the "state machine", in the trac.ini file.
     15A "state machine" is just a definition of the steps (known as states) your artifacts should go through after they are created, of the actions that are allowed in each state and that may transition the artifact into a different state, and of the operations the system should perform on the artifact, or on anything else, along with these actions.
    1716
    1817A state machine indeed defines three things:
     
    2019 * Transition actions - the User actions avaiable in each state, which may optionally move the artifact from that state to another.
    2120 * Operations - what the system must perform on the artifact (but not only) when a certain transition action is triggered.
    22  
     21
    2322The three elements above are specified in the trac.ini file with the following syntax.
    2423
     
    8483   '''action'''.permissions = '''permission1''','''permission2''',...
    8584 
    86  
     85[[BR]]
     86Defining your desired workflow in the trac.ini file '''is all that is required''' to mandate a workflow to the artifacts provided with the TestManager plugin.
     87
     88[[BR]]
    8789=== Example ===
    8890
     
    115117}}}
    116118
     119[[BR]]
    117120=== 2) Implement any custom operations ===
    118121
    119 A set of predefined, [wiki:TestManagerPluginWorkflowOperations out-of-the-box operations] is available, but you may want to create your own operations to fit your needs.
     122A set of predefined, [wiki:TestManagerPluginWorkflowOperations out-of-the-box operations] is available, but '''you may want to create your own custom operations''' to fit your needs.
    120123
    121124To do this, you must write python code into a plugin, and deploy it along with the TracGenericClass and TracGenericWorkflow plugins.
     
    197200   It is '''NOT allowed''' to modify the res_wf_state object.
    198201   
    199    
    200 === 3) Add workflow support to any of your artifacts ===
    201 
    202 Test artifacts already have workflow support. To turn it on, all you must do is define the desired workflow in the trac.ini file, as described above.
     202This is it. You have added a workflow and your custom operations to the Test Case artifact.
     203
     204Of course, you can do the same with the three other artifacts in the TestManager plugin, namely Test Catalogs, Test Plans and Test Cases in Plan (i.e. with a status).
     205
     206[[BR]][[BR]]
     207
     208== Add workflow support to any of your artifacts ==
     209
     210As said, Test artifacts already have workflow support. To turn it on, all you must do is define the desired workflow in the trac.ini file, as described above.
    203211
    204212But there is more you can do with the TracGenericWorkflow standalone plugin (remember it requires TracGenericClass plugin to be installed, anyway), you can add workflow support to any of your artifacts inside Trac.
     
    292300
    293301Note: [wiki:TestManagerForTracPlugin TestManager] artifact resources are made so that their resource ID is a string representation of their key properties, in the form of a JSON dictionary.
    294 This is why you see the following code, where to build a Trac Resource corresponding to a [wiki:TestManagerForTracPlugin TestManager] aretifact, I first build the Resource ID as the string representation of the artifact's key properties, then use it to create the Resource:
     302This is why you see the following code, where to build a Trac Resource corresponding to a [wiki:TestManagerForTracPlugin TestManager] artifact, I first build the Resource ID as the string representation of the artifact's key properties, then use it to create the Resource:
    295303
    296304{{{