Tuesday, May 27, 2008

Tip to create workflow in JIRA quickly

To my colleagues who want to create quickly new workflow and don't want to touch xml \ property files.

On Administrator \ Workflows

  1. If you don't have default workflow then create default Workflow with default JIRA "workflow" - it will show status as "active" so we cannot update its scheme \ workflow steps.
  2. Copy this workflow -- it has status as "Inactive" so we can update workflow scheme.
  3. Go to link "steps" and add new status \ transitions for new steps as required in your workflow.


On Administrator \ Workflow Schemes

  1. Create new "Workflow Scheme" then click on "Workflows" link operation of new workflow just created.
  2. Assign workflow to scheme,... Issue type "Bug" and select our workflow from the list.
  3. Assign other workflows for issue types : Task, New Feature or Improvement with default workflow ( named JIRA ) or your workflow.


Now our workflow scheme is ready to associate with our project.
Go to your project admin panel and set workflow scheme there.

Let me know if you need more detail :)

Takecare,
Nimesh.



Typical Project flow with QA Loop in Jira (Atlassian)

Last week, one of my friend needs some help to establish Project\QA workflows on Jira (Atlassian)
So here I am happy to share some of my odd solution.

Project Flow problems or hard to implement in Jira were

* One stage splits with multiple stages in flow.
* More than one stages merges to one stage.

Here We have Brainstorming splits to UT - ST stage and Dev Review - QA Review merges with Review stage executed by System Group Members in project flow.

One issue splits with more than one issues, can also be implemented with sub-tasks feature but it may not push next stage in the project flow as the project progresses; all sub-tasks are linked to the parent task only, may not execute inline flow; may not give more control to administrator\lead and may be more complicated to maintain. Sub-tasks may not be merged to one task on transitions after Dev. Review / QA Review merges to Review stage.

Core objective is to implement flow that anyone can see each stage of the flow and can go back and forth from any stage, Dev and QA stage should work parallel and merge to "Review" and then System Verification should be executed as build in QA loop.
Administrator \ Lead of each stage would have full control to execute project development and would have transparency; Jira could help to push next stage after each stage done.

We first implement above flow as manually after we will find which actions need to automate.
Manually Implementation :
# Created issue types for all Project Concept, Brainstorming, ST Identification, UT Identification...until System Verification as Standard Issue type like task.
# Create work-flow schemes for each issue type we have created i.e. ProjectConcept work-flow will have step Created, Go for Brainstorming , Reopen.
# Enable Issue Linking from Administrator and create two link type as we have two flow one is task flow other is defect flow.
* Project Flow :
- Outward Description : created after , Inward Description : progressed to
* Defect QA Loop :
- Outward Description : Linked to , Inward Description : Linked by
# Associate each work-flow with its issue type.
# When flow step done -- create new issue type of the next flow step and link it with its previous parent issue type on Project Flow.
# On SV step make it open and add reference to each defect in its sv step.

Here is snapshot after implemented above actions :

We can automate manual actions
# Create next flow issue type when specific issue committed or completed,
# Assign to the lead,
# Add reference(link) to previous parent issue type.
Automation :
Here I will show one implementation from stage Project Concept to Brainstorming; Others can be implemented as same way.
For this we will create Jelly script and add them in Jelly Service of Jira.Script executes filter and get issues with issue-type : Project Concept , status : "Go for brain storming" and which does not have comment "Brainstorm added" and does manual actions and then add comment "Brainstorm added" to project concept(previous step of the flow) so next time when service executes same project concept will not create brainstorm step.
Created filter : GetProjectConceptsWithNonBrainstormingAdded at desk for this project.

Copy script code
To execute above script, update your FilterId with 10020 to yours filterId, to find filterId go to Find Issues / Manage and put cursor on your filter and see the filterId on status bar.

Please, feel free to ask any question regardings.

Thanks,
Nimesh Vadgama.

Sunday, May 11, 2008

Combinations n Permutations in QA

Combinations n Permutations are very useful in software testing.
It help to find possible test-data / testcases. This session will provide details about

1. Some basics about Combinations
2. Logic to find possible combinations for taking k numbers of items from n number items at a time.

1. Some basics about Combinations.
You might be come across with below example in old school days.
We have set { "ant", "bug", "cat", "dog", "pig" } and If we want to take 3 elements at a time then we would have possible combinations as
{ "ant", "bug", "cat" }
{ "ant", "bug", "dog" }
{ "ant", "bug", "pig" }
{ "ant", "cat", "dog" }
{ "ant", "cat", "pig" }
{ "ant", "dog", "pig" }
{ "bug", "cat", "dog" }
{ "bug", "cat", "pig" }
{ "bug", "dog", "pig" }
{ "cat", "dog", "pig" }

So for n=5 and k=3 in above we would have 10 possible combinations.
How we can count ?
We have formula :

Total number of combinations = n * (n-1) * (n-2) * ....* (n - k +1) \ 1 * 2 * ...* k

So, n= 5 and k= 3
Total number of combinations = 5 * 4 * 3 \ 1 * 2 * 3 = 10
We will use this formula to implement C# function Choose(n,k) to find total number of possible combinations in coming session.


2. Logic to find possible combinations for taking k numbers of items from n number items at a time.
The basic logic is to get all possible combinations item index.
So, If we have data[5] = { "ant", "bug", "cat", "dog", "pig" }
{ "ant", "bug", "cat" } = { data[0] , data[1] , data[2] }
and so we need to get { 0 , 1 , 2 }
{ "ant", "bug", "dog" } = { data[0] , data[1] , data[3] }
and so we need to get { 0 , 1 , 3 }

And for others as respectively we need to get
{ 0 , 1 , 4 }
{ 0 , 2 , 3 }
{ 0 , 2 , 4 }
{ 0 , 3 , 4 }
{ 1 , 2 , 3 }
{ 1 , 2 , 4 }
{ 1 , 3 , 4 }
{ 2 , 3 , 4 }

To find combinations we will use lexicographical algorithm.
In this algorithm, we find successor. Successor is the next possible combination.
Say for { 0 , 1 , 2 } we have successor { 0 , 1 , 3 }
The core logic to get successor is first to find right most element that must be incremented then we increment all right most elements for that we will create Combination Class and implement two constructor to set base data, n and k of the set as per requirement and then execute Successor Method and will store all possible combinations of object array and display as well.

Inspired by article of Dr. James McCaffrey on String Permutation.

Thursday, May 1, 2008

Automate QA Feeds task [continuous to last post]

Continuous post of CSV\XML\RSS Feeds are QAed

To validate Feed URL(s) are not broken ; we can use XML DOM. Below is script that validates broken link.

To validate ASCII Character , I have used below script.

You can create excel custom tool where you centralize all feeds , verifies broken resources before creating actual feed.




Popular Posts