Using Excel for Test Metrics

Agenda
Understanding Excel
Basics Text to columns and back Relative and absolute values Names CountIf / sumIf Subtotal vs consolidate Paste special Autofill Formulas ± if, then Audit formulas Filter Conditional formatting

Application to Metrics
Understand the numbers Types of reports Gas gauge Progress chart Defect find / fix rate

Understanding Excel

Basics 
       

Auto sizing columns and rows Entering formulas Editing formulas Cell formatting View or hide formulas, gridlines, row and column headers Hyperlinks Worksheet / workbook relationships Status Bar calculator Help

Text to Columns
George Jetson Sally Johnson Joe Smith Chris Murray

-- TO --

George Sally Joe Chris

Jetson Johnson Smith Murray

1. Select the cells that you want to split apart (be sure the columns to the right are empty as they will be overwritten). 2. Click on Data, Text to Columns. 3. Choose Delimited. 4. Choose Space (or the delimiter that you are using). 5. Click Finish.

Combining Text Fields
Geo ge Jetson

-- TO -Mu

y Johnson th, Joe y, Ch s

1. Click on a blank cell (usually to the right of the existing cells). 2. Type in one of the following formula examples: a. =A1&" "&B1 to list first name, then a space, then the last name b. =B4&", "&A4 to list last name, then a comma, then the first name 3. The ampersand (&) character allows you to concatenate text fields together. The quotes will show up as text as in ³ ³ for a space or ³, ³ for a comma and a space.

Relative and Absolutes

$ symbols in formulas allow you to ³lock´ a column or row. This is a must if you try to copy and paste or autofill a formula. When the cell is selected in the formula, press F4 to have it cycle between $C$R, C$R, $CR, CR

B 2 3 4 5 6

C

D

Pay Rate George Jetson Sally Johnson Joe Smith Chris Murray 10 10.5 9.75 10.25

Bill Rate =C3*$B$9 =C4*$B$9 =C5*$B$9 =C6*$B$9

8 9

OT multiplier 1.5

Name a Cell Reference
Make your formulas more ³readable´ by naming cells 1. Click on a cell 2. In the Formula bar where it shows the Column / Row reference, type in name and press enter. 3. Reference that name in a formula. To view the list of names, click on Insert, Name, Define
B 2 3 4 5 6 George Jetson Sally Johnson Joe Smith Chris Murray C Pay Rate 10 10.5 9.75 10.25 D Bill Rate =C3*OTx =C4*OTx =C5*OTx =C6*OTx

8

OT multiplier 1.5

9

CountIf / SumIf
CountIf: =countif(range,criteria) SumIf: =sumif(range,criteria,[sum_range])  Range = the range of cells you want evaluated / counted  Criteria = the criteria in the form of a number, expression, or text that defines which cells will be added. For example, criteria can be expressed as 32, "32", ">32", "apples".  Sum_range = the actual cells to sum.
B 2 3 4 5 6 7 8 9 10 11 12 13 14 Tech 1 Tech 2 Engineer =COUNTIF($B$3:$B$6,B12) =COUNTIF($B$3:$B$6,B13) =COUNTIF($B$3:$B$6,B14) =SUMIF($B$3:$B$6,B12,$D$3:$D$6) =SUMIF($B$3:$B$6,B13,$D$3:$D$6) =SUMIF($B$3:$B$6,B14,$D$3:$D$6) Tech 1 Tech 2 Engineer =COUNTIF($B$3:$B$6,"tech 1") =COUNTIF($B$3:$B$6,"tech 2") =COUNTIF($B$3:$B$6,"engineer") =SUMIF($B$3:$B$6,"tech 1",$D$3:$D$6) =SUMIF($B$3:$B$6,"tech 2",$D$3:$D$6) =SUMIF($B$3:$B$6,"engineer",$D$3:$D$6) Position tech 1 tech 2 engineer tech 1 C Name George Jetson Sally Johnson Joe Smith Chris Murray D Hours Worked 40 40 50 50

Subtotal vs. Consolidate 

Subtotal
Dynamic (if linked to source data, when source data updates, subtotals update) Ideal for a set number of rows (if referencing this data in another sheet) Adjusts existing data 

Consolidate
Static (no change when source data is updated) Ideal for a varying set of rows (if referencing this data in another sheet) Results are stored in a different location

Subtotal 
   

Select a cell in the range Click Tools, Subtotal Choose the reference column Choose the function (sum, average, etc.) Choose the column(s) to subtotals

Subtotals
Project Project A Project A Project A Project A Project A Project B Project B Project B Project B Project B Task Task 1 Task 2 Task 3 Task 4 Task 5 Task 1 Task 2 Task 3 Task 4 Task 5 Wk 1 5 20 35 20 40 12 20 35 8 15 Wk 2 15 11 40 32 15 4 35 15 22 18 Wk 3 30 16 40 27 8 8 15 28 35 8 Wk 4 10 22 40 22 33 15 10 33 12 13

Consolidate  

  



Select a blank cell (usually a new sheet or below the existing data) Click Tools, Consolidate Choose the function (sum, average, etc.) Choose the range(s) to consolidate; click on Add after each one Choose Left Column Note: if you check ³create links to source data,´ it will do a subtotal

Consolidate
Project Project A Project A Project A Project A Project A Project B Project B Project B Project B Project B Task Task 1 Task 2 Task 3 Task 4 Task 5 Task 1 Task 2 Task 3 Task 4 Task 5 Wk 1 5 20 35 20 40 12 20 35 8 15 Wk 2 15 11 40 32 15 4 35 15 22 18 Wk 3 30 16 40 27 8 8 15 28 35 8 Wk 4 10 22 40 22 33 15 10 33 12 13

Project Project A Project B 120 90 113 94 121 94 127 83

Paste Special
Accessible from the right click menu after a copy

Some options available from the from the icon after a paste

Paste Special 
   

Formulas ± pastes formulas only, no formatting Values ± pastes the results of the formula (can also use F9) Formats ± pastes the format (no data); can also use the format painter Skip blanks ± pastes the values of cells containing data, skips blank cells Transpose ± transposes the data ± converts rows to columns or columns to rows

AutoFill   



Type in the first two items in a series; autofill the rest by dragging the cells Make your own autofill lists under Tools, Options, Custom Lists Use the CTRL to adjust the autofill Downfall: the list is static

Jan Feb

Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

1 2

1 2 3 4 5 6 7 8 9 10 11 12

1/1/05 1/2/05

1/1/05 1/2/05 1/3/05 1/4/05 1/5/05 1/6/05 1/7/05 1/8/05 1/9/05 1/10/05 1/11/05 1/12/05

Alternatives to AutoFill 

Formulas, of course

1/1/05 =A1+1 =A2+1 =A3+1 =A4+1 =A5+1 =A6+1 =A7+1 =A8+1 =A9+1

1/1/05 =B1+7 =B2+7 =B3+7 =B4+7 =B5+7 =B6+7 =B7+7 =B8+7 =B9+7

Formulas ± if / then 

Use conditional statements in formulas
Error handling (avoid div/0 errors) Create ³smart´ formulas that can adjust on the fly
Possible Pass 110 0 112 0 Fail 5 0 0 0 % Pass =C2/$B2 =C3/$B3 =C4/$B4 =C5/$B5 % Fail =D2/$B2 =D3/$B3 =D4/$B4 =D5/$B5

Cell Formatting Basic Formulas Complex Formulas Charts

115 28 205 0

Possible Cell Formatting Basic Formulas Complex Formulas Charts 115 28 205 0

Pass 110 0 112 0

Fail 5 0 0 0

% Pass =IF($B8>0,C8/$B8,0) =IF($B9>0,C9/$B9,0) =IF($B10>0,C10/$B10,0) =IF($B11>0,C11/$B11,0)

% Fail =IF($B8>0,D8/$B8,0) =IF($B9>0,D9/$B9,0) =IF($B10>0,D10/$B10,0) =IF($B11>0,D11/$B11,0)

Formula Audit
Select the formula you want to audit  Click on Tools, Formula Auditing, Evaluate Formula 

Filter 


Select a cell in the data range Click on Data, Filter, Auto Filter

Conditional Formatting
Based on the value of a cell / cells, adjust the formatting on the fly  Click the cell / cells, click on Format, Conditional Formatting  Note: trial and error is necessary in here; accepts absolute and relative values, accepts some formulas 

Application to Metrics

Understanding Numbers 

"Get your facts first, then distort them as you please." ~ Mark Twain "Facts are stubborn, but statistics are more pliable." ~ Mark Twain Torture numbers, and they'll confess to anything. ~Gregg Easterbrook 98% of all statistics are made up. ~Author Unknown   

What does this mean? 

Choice of formulas makes a difference
Using averages vs. totals based on number of tests will show different results 

One view of numbers is never enough
%pass, %fail numbers don¶t mean much if you don¶t know kind of defects are logged 

Numbers alone are never enough
Tests can¶t cover everything Gut feel should still mean something ± sometimes numbers are hard to grasp

Types of Metrics 


Gas Gauge ± overview of pass, fail, blocked reports Progress Report ± historical view of pass, fail, and blocked reports Defect Find / Fix Report ± how fast are we finding defects vs. how fast are they being fixed Release Criteria ± what are the criteria to release the project
Pass rate for all components must be 97% or higher Submit rate of high priority defects must be less than x% of the average defects logged in the last x weeks. Stress test GUI errors per 1,000 hours must be less than .02  

Gas Gauge

How to build the gas gauge 
 

Gather the raw data Organize it by test area / category / test type Create the following for each line:
% complete of planned % pass of planned % fail of planned % block of planned -- % pass of complete -- % fail of complete -- % block of complete 

 

Determine whether to use % of planned or % of complete (may use both depending on the report) Determine whether totals should be averages or based on the actual number of tests Develop the gas gauge

Progress Chart ± Ideal world

Progress Chart ± real world

How to build the progress chart
Determine the total number of tests possible for each area  Determine milestones for 100% execution, 60% pass, 80% pass, 90% pass  Weekly, track the number of passes, fails, and blocks 

Find / Fix Rate ± Ideal World

Find / Fix Rate ± Real World

Find / Fix Rates
Track for all defects  Track for just high priority (must fixes for a product to ship)  Track number of defects submitted and resolved each week  Chart the results