May 6, 2010

Filtering TestTrack TCM Test Runs Based on Test Variants

Helix ALM
Test Management
Recently, a customer asked the following question: "How can you filter the list of test runs based on the test variants it contains?" The reason the question came up is because, while you can display a "Test Variant" column in the Test Runs list window, you can only filter the column between runs that have variants and those that do not. [caption id="attachment_2302" align="aligncenter" width="520" caption="TestTrack TCM Variants Column Filter Options"]TCM Variants Column Filter Options [/caption]
x
So how can you filter test runs based on variants? Seems like a pretty useful thing to do. The answer is you use advanced filters. I am going to show you how to implement this in the Sample Project that ships with TestTrack TCM. There are three variants defined in the sample project, as shown in the following screenshot: [caption id="attachment_2303" align="aligncenter" width="373" caption="TCM Sample Project Variants"]TCM Sample Project Variants[/caption]
x

Creating the Filter

Since I like to have flexibility when I do my searches, I am going to create two dynamic filters.  One will "AND" all three variants, and the other one will "OR" all three variants. If I need something else, then I can use the "Advanced Find" (CTRL + F) and perform an ad-hoc search. For both filters, each criteria prompts the user for information. First I created the "And" filter like this:

[caption id="attachment_2258" align="aligncenter" width="503" caption="TCM "AND" Variant Filter"]TCM "And" Variant Filter[/caption]
x
I then duplicated the filter, edited the name to contain "or", and then changed the "AND/OR" column to "OR": [caption id="attachment_2259" align="aligncenter" width="507" caption="TCM "OR" Variant Filter"]TCM "OR" Variant Filter[/caption]
x
A different approach could be to create three filters, one for each variant.  If you take this approach, you will get the same results as the "OR" filter.

Example

Now let's look at an example.  Let's say I want to get a list of all test runs that have the "Native Client" variant and the "Native" database variant and the "Windows" variant. In the test run list window, I select the "AND" filter: [caption id="attachment_2263" align="aligncenter" width="603" caption="Selecting the AND Variant Filter"]Selecting the AND Variant Filter[/caption]
x
The Interactive Filter Wizard opens.  The first criteria I am prompted to select is the Operating System.  I choose "Windows" and click Next. [caption id="attachment_2264" align="aligncenter" width="424" caption="Choosing the Operating System Variant"]Choosing the Operating System Variant[/caption]
x
Next I am prompted to choose the Database.  I choose "Native" and click Next. [caption id="attachment_2265" align="aligncenter" width="426" caption="Choosing the Database Variant"]Choosing the Database Variant[/caption]
x
Finally, I am prompted to choose the Client Type. I choose "Native" and click Finish. [caption id="attachment_2268" align="aligncenter" width="426" caption="Choosing the Client Type Variant"]Choosing the Client Type Variant[/caption]
x
The end result is I get the test runs I was looking for: [caption id="attachment_2271" align="aligncenter" width="677" caption="Filtered Results"]Filtered Results[/caption] Note: If all I wanted was a list of test runs that contained the "Windows" variant, I would have "Selected All" on the two other variants.