43
Metrics for Software Testing Measuring Project, Process, and Product

Testing Metrics: Project, Product, Process

Embed Size (px)

DESCRIPTION

One of the most challenging problems that test managers face involves implementing effective, meaningful, and insightful test metrics. Data and measures are the foundation of true understanding, but the misuse of metrics causes confusion, bad decisions, and demotivation. Rex Black shares how to avoid these unfortunate situations by using metrics properly as part of your test management process. How can we measure our progress in testing a project? What can metrics tell us about the quality of the product? How can we measure the quality of the test process itself? Rex answers these questions, illustrated with case studies and real-life examples. Learn how to use test case metrics, coverage metrics, and defect metrics in ways that demonstrate status, quantify effectiveness, and support smart decision making. Exercises provide immediate opportunities for you to apply the techniques to your own testing metrics. Join Rex to jump-start a new testing metrics program or gain new ideas to improve your existing one.

Citation preview

Page 1: Testing Metrics: Project, Product, Process

Metrics for Software TestingMeasuring Project, Process, and

Product

Page 2: Testing Metrics: Project, Product, Process

Metrics for Testing: Managing with Facts

By using metrics, we can manage with facts and reality

How can we use metrics to manage testing? What metrics can we use to measure the test process? What metrics can we use to measure our progress in testing a project? What do metrics tell us about the quality of the product?

Let’s see if we can find some answers…Metrics for Testing

www.rbcs-us.com Copyright (c) RBCS 2005-2012 Page 2

Page 3: Testing Metrics: Project, Product, Process

Part 1: Why and How of Metrics

Page 4: Testing Metrics: Project, Product, Process

Why Metrics?

Managing with metrics—for testing or anything—allows us to manage with factsSubjective, uninformed opinions are not a sound basis for managementWhat sounds reasonable can be wrong (e.g., Aristotle)

Metrics for Testing Page 4www.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 5: Testing Metrics: Project, Product, Process

Why Testing Metrics?Testing by itself has no value…but it produces potentially valuable informationTest information must be generated and communicated effectively to be valuableCommon communication goals

Notify (“We have 24 bugs remaining to close”)Enlighten (“See the time lost due to reopens”)Influence (“We propose a bug triage meeting”)

The metrics should be used as part of regular status reports (dashboards) as well as periodic analyses

Metrics for Testing Page 5www.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 6: Testing Metrics: Project, Product, Process

How to Develop Metrics?Identify objectives Create questions about effectiveness, efficiency, and elegance of achievement of objectives Devise a measurable metric (or find a surrogate metric) to address the question Set a goal for each metricImplement improvements to enhance achievement of objectivesLet’s look at two examples…

Metrics for Testing Page 6www.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 7: Testing Metrics: Project, Product, Process

Example One

Objective: Find defectsEffectiveness question: Have we finished finding new defects?Metric: Track trend in defect discovery during testingGoal: Watch for convergence (more later)Improvement: Find bugs earlier

Metrics for Testing Page 7www.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 8: Testing Metrics: Project, Product, Process

Example TwoObjective: Build confidenceNote that we need a surrogate metric for confidence; one way is to measure coverageCoverage has multiple dimensionsEffectiveness question: Do any requirements have identified failures?Metric: What % of requirements are completely tested without any failures, what % requirements have failures, what % are untestedGoal: 100% requirements tested without must-fix failuresImprovement: Reduce % of requirements that fail in testing

Metrics for Testing Page 8www.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 9: Testing Metrics: Project, Product, Process

Metrics for Testing Page 9

Good MetricsDefine a useful, pertinent, and concise set of quality and test metrics Avoid too large a set of metrics

Too difficult to measure later Confusing to participants

Ensure uniform, agreed interpretations of these metrics, to minimize disputes and divergent opinions about measures of outcomes, analyses, and trendswww.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 10: Testing Metrics: Project, Product, Process

Page 10

Tracking MetricsAutomated tool support can reduce the time required to capture, track, analyze, report, and measure metrics Apply objective and subjective analysis for specific metrics over time, especially when trends emerge that could allow for multiple interpretations of meaningBe aware of and manage the tendency for people’s interests to affect the interpretation they place on a particular metric or measure

Metrics for Testingwww.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 11: Testing Metrics: Project, Product, Process

Page 11

Reporting Metrics and Measurements

Reporting of metrics and measures should enlighten management and other stakeholders, not confuse or misdirect themGood testing reports based on metrics should be easily understood, not overly complex or ambiguousGood testing reports based on metrics should help management improve processes, guide the project to success, and manage product qualityMetrics include snapshots of status at a moment in time, trends emerging over time, and analysis of causes and relationships between factors that influence testing and quality outcomes

Metrics for Testingwww.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 12: Testing Metrics: Project, Product, Process

Part 1: Why and How of Metrics

Exercise

Page 13: Testing Metrics: Project, Product, Process

Develop a MetricPick any personal, professional, or business objectivePose a question about the effectiveness, efficiency, and elegance of achievement of this objective Devise a measurable metric (or find a surrogate metric) to address the question Set a goal for each metric

Metrics for Testing Page 13www.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 14: Testing Metrics: Project, Product, Process

An Example

Objective: train for a marathonEffectiveness question: Can I complete the marathon?Metric: starting with a 10 km run, run a long run every weekend, adding 2 km every weekendGoal: Continue for 14 weeks until reaching 38 km two weeks before actual marathon

Metrics for Testing Page 14www.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 15: Testing Metrics: Project, Product, Process

Part 2: Process Metrics

Page 16: Testing Metrics: Project, Product, Process

Process Metrics for TestingUses

To measure the effectiveness, efficiency, and elegance of the test processTo provide the insights to guide where process improvements should occur

Part of certain test process assessments (e.g., using CTP framework)Not used as frequently as should be the caseNot typically part of any dashboard (but can be)

Metrics for Testing Page 16www.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 17: Testing Metrics: Project, Product, Process

Developing Good Process Metrics

Determine key objectives for the test processTypical objectives

Finding bugs, especially important bugsReducing quality risk

Decide which important effectiveness, efficiency, and elegance questions applyCreate metrics that address those questionsSet goals that reflect current or desired capability

Metrics for Testing Page 17www.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 18: Testing Metrics: Project, Product, Process

Bug Finding EffectivenessObjective: Finding bugsQuestion: What percentage of bugs found?Metric: Defect detection percentageGoal: A typical number is 85%, though some teams do much better

Metrics for Testing Page 18

present bugs

detected bugsDDP

bugs production bugstest

bugstest )(

testingforDDP

www.rbcs-us.com Copyright (c) RBCS 2005-2012

Page 19: Testing Metrics: Project, Product, Process

Bug Finding Focus

Objective: Finding important bugs Question: Do we find more important bugs than less important bugs?Metric: Relation of DDPs (see below)Goal: Relationship shown below is always true

Metrics for Testing Page 19

)()( bugscriticalDDPbugsallDDP www.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 20: Testing Metrics: Project, Product, Process

Metrics for Testing Page 20www.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 21: Testing Metrics: Project, Product, Process

Metrics for Testing Page 21www.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 22: Testing Metrics: Project, Product, Process

Part 2: Process Metrics

Exercise

Page 23: Testing Metrics: Project, Product, Process

Test Process Metric

Define an objective for your test processDefine an effectiveness, efficiency, or elegance questionCreate a metric that addresses that questionsDiscussMeasure your own test process when you get back to your office

Metrics for Testing Page 23www.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 24: Testing Metrics: Project, Product, Process

Part 3: Project Metrics

Page 25: Testing Metrics: Project, Product, Process

Project Metrics for TestingUses

To measure the progress of the testing effort on a projectTo provide the insights to guide where project optimizations might be needed/useful

Part of certain test process assessments (e.g., using CTP framework)The most commonly used test metricsUsually included in test dashboards (often over-relied upon)

Metrics for Testing Page 25www.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 26: Testing Metrics: Project, Product, Process

Metrics for Testing Page 26www.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 27: Testing Metrics: Project, Product, Process

Metrics for Testing Page 27www.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 28: Testing Metrics: Project, Product, Process

Metrics for Testing Page 28www.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 29: Testing Metrics: Project, Product, Process

Metrics for Testing Page 29www.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 30: Testing Metrics: Project, Product, Process

Metrics for Testing Page 30www.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 31: Testing Metrics: Project, Product, Process

Page 31

A Troubled Project’s Defect Metrics

Metrics for Testingwww.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 32: Testing Metrics: Project, Product, Process

Part 3: Project Metrics

Exercise

Page 33: Testing Metrics: Project, Product, Process

Your Current Test Project Metrics

Sketch or describe your current test project metrics Classify your presentation of each metric as:

Snapshot of status (e.g., tables)Trend chartAnalysis/causality

What do you think is missing from your metrics?Discuss

Metrics for Testing Page 33www.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 34: Testing Metrics: Project, Product, Process

Part 4: Product Metrics

Page 35: Testing Metrics: Project, Product, Process

Product Metrics for TestingUses

To measure the quality and residual quality risk in the productTo provide the insights to guide where product improvements should occur

Good testing should measure the quality of the systemNot always measured during testing (using project metrics instead)Not always on testing dashboards (but should be)

Metrics for Testing Page 35www.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 36: Testing Metrics: Project, Product, Process

Page 36

Example: Reporting Residual Levels of Risk

Test execution period

Region in green represents risks for which all tests were run and passed and no must-fix bugs were found. Region in red represents risks for which at least one test has failed and at least one must-fix bug is known. Region in black represents other risks, which have no known must-fix bugs but still have tests pending to run.

Metrics for Testingwww.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 37: Testing Metrics: Project, Product, Process

Page 37

Example: Testing and RiskDefects Tests

Quality Risk Areas # % Planned Executed

%

Performance 304 27 3,843 1,512 39

Security 234 21 1,032 432 42

Functionality 224 20 4,744 2,043 43

Usability 160 14 498 318 64

Interfaces 93 8 193 153 79

Compatibility 71 6 1,787 939 53

Other 21 2 0 0 0

Total 1,107

100 12,857 5,703 44

Metrics for Testingwww.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 38: Testing Metrics: Project, Product, Process

Use of Standards

Metrics for Testing Page 38

Functionality: Suitability, accuracy, interoperability, security, compliance

Reliability: Maturity (robustness), fault-tolerance, recoverability, compliance

Usability: Understandability, learnability, operability, attractiveness, compliance

Efficiency: Time behavior, resource utilization, compliance

Maintainability: Analyzability, changeability, stability, testability, compliance

Portability: Adaptability, installability, co-existence, replaceability, compliance

Addressed by functional tests

Addressed by non-functional tests

www.rbcs-us.com Copyright (c) RBCS 2005-2012

Page 39: Testing Metrics: Project, Product, Process

Metrics for Testing Page 39www.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 40: Testing Metrics: Project, Product, Process

Part 4: Product Metrics

Exercise

Page 41: Testing Metrics: Project, Product, Process

Your Current Product MetricsSketch or describe how you currently measure the product during testing

Coverage of requirements, configurations, etc.Residual level of riskConfidence in the product

Sketch or describe how your organization currently measures product quality during actual useHow well do your pre-release metrics predict product quality as experienced by the users and customers?Discuss

Metrics for Testing Page 41www.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 42: Testing Metrics: Project, Product, Process

ConclusionsMetrics can be useful to measure, understand, and manage process, project, and product attributesTesting metrics are essential for a complete understanding of statusUse a small number of metricsUse surrogate metrics where necessaryEnsure consistent stakeholder understanding of metricsDefine objectives, then questions, then metrics, then goalsUse the goals to drive meaningful process improvements

Metrics for Testing Page 42www.rbcs-us.com

Copyright (c) RBCS 2005-2012

Page 43: Testing Metrics: Project, Product, Process

Metrics for Testing Page 43

For almost twenty years, RBCS has delivered consulting, outsourcing and training services to organizations that want to improve their software and hardware testing. Employing the industry’s most experienced and recognized consultants, RBCS assesses test teams, manages testing projects, builds and improves testing groups, and provides test experts for hundreds of clients worldwide. Ranging from Fortune 20 companies to start-ups, RBCS clients save time and money through improved system development, decreased failures in production, improved corporate reputation and more. To learn more about RBCS, visit www.rbcs-us.com.Address: RBCS, Inc.

31520 Beck RoadBulverde, TX 78163-3911USA

Phone: +1 (830) 438-4830E-mail: [email protected]: www.rbcs-us.com

To Contact RBCS

www.rbcs-us.com Copyright (c) RBCS 2005-2012