Changes between Version 4 and Version 5 of TestManagerForTracPluginWorkflow
- Timestamp:
- Oct 9, 2010, 2:54:06 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TestManagerForTracPluginWorkflow
v4 v5 8 8 9 9 10 == How to implement Workflow on Test Cases ==10 == Example: How to implement Workflow on Test Cases == 11 11 12 12 The following is a cookbook to implement Workflow on Test Cases. 13 13 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. 14 All is required it to define the desired workflow steps, a.k.a. the "state machine", in the trac.ini file. 15 A "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. 17 16 18 17 A state machine indeed defines three things: … … 20 19 * Transition actions - the User actions avaiable in each state, which may optionally move the artifact from that state to another. 21 20 * Operations - what the system must perform on the artifact (but not only) when a certain transition action is triggered. 22 21 23 22 The three elements above are specified in the trac.ini file with the following syntax. 24 23 … … 84 83 '''action'''.permissions = '''permission1''','''permission2''',... 85 84 86 85 [[BR]] 86 Defining 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]] 87 89 === Example === 88 90 … … 115 117 }}} 116 118 119 [[BR]] 117 120 === 2) Implement any custom operations === 118 121 119 A set of predefined, [wiki:TestManagerPluginWorkflowOperations out-of-the-box operations] is available, but you may want to create your own operationsto fit your needs.122 A 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. 120 123 121 124 To do this, you must write python code into a plugin, and deploy it along with the TracGenericClass and TracGenericWorkflow plugins. … … 197 200 It is '''NOT allowed''' to modify the res_wf_state object. 198 201 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. 202 This is it. You have added a workflow and your custom operations to the Test Case artifact. 203 204 Of 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 210 As 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. 203 211 204 212 But 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. … … 292 300 293 301 Note: [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] ar etifact, I first build the Resource ID as the string representation of the artifact's key properties, then use it to create the Resource:302 This 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: 295 303 296 304 {{{