Saying a lot while writing very little using test matrices.

Saying a lot while writing very little using test matrices.

Very often in testing we need to think about and describe a very large set of possible test problems. Perhaps are asking for clarification on requirements. Maybe we anticipate testing certain behaviors, or we are trying to clarify priorities and risks. Perhaps we are reporting on what testing we did do.

In any of those situations, there are often cases where the permutations get very large. One approach would be to describe every permutation, every possible test condition, in a list. This is time consuming, tedious, and is the fastest way to lose the attention of anybody you are communicating with. We need ways to say a lot in very little space that is easy to understand.

The following is one example - the test matrix. The content is an excerpt from my book "Writing Test Plans Made Simple".



Explaining Combinations of Tests with Matrices and Tables

Behind flat lists, one of the most common and popular ways to model tests is with some sort of matrix. They are popular because many tests are about combining multiple variables or actions together to see an effect. Matrices are usually represented as tables where the rows and columns are combined together to describe a set of tests. They are a simple construct with a lot of power.

The simplest matrix usually represents the test problem as if all the values in every column were combined together to comprise the tests. The end result is multiplicative. Consider the following example:

Test Issue: How well does Web-Calc hand different types of dual operand mathematical formulas?

Methodology: ?Create formulas of the form “<X> <Operator> <Y>”, using each value of X, Y and Operator from the following table:

A 3x3 matrix. First two columns are X and Y with each representing the boundary values around + and - 0, .01, MAXINT and MININT. Third column are example arithmetic operations for Add, Subtract, Multiply, Divide, Raise, Square, Modulus.

In the example above, there are 8 values for X, 8 values for Y and 7 values for Operator. This results in 8x8x7=648 tests. Imagine if all of those tests had been written as a list. It would have gone on for pages and pages, and almost nobody would have the patience or energy to read the entire list effectively. But, represented as a table, all of the tests can be perceived and reviewed without even having to flip pages. Everything can be seen in one eyeful.

I call this the, “one eyeful rule” of test analysis. Generally, people do really well understanding a problem if they can read it all in one image. If they have to scroll, flip, or change views, the problem is hard to understand, as they have to remember information during all the flipping.?It is also important that whatever is presented is still legible in one eyeful.

Don’t take the “one eyeful rule” so seriously that you do something unnatural in the test analysis, but definitely be mindful of it. You will often find that modeling the problem in a way where it can be understood all at once will force you to see things you didn’t before.

There is a lot more that can be done with matrices and tables, and indeed a good deal of testing theory rests on using such tables as a means of constructing tests that maximize coverage without having to execute every single test in the analysis. In this book, I am more concerned with introducing you to these simple, yet powerful tools as a way of making the writing easier.?



I cover more strategies such as above in "Writing Test Plans Made Easy." It describes several ways of quickly describing the questions and tests for an application.

Peter Hawkins

Major Retired at c/- the beach.

1 年

Building a test condition test case matrix in Excel enables the addition of multiple conditions and the many features of Excel can make it the most powerful of tools. I have run multi million dollar test engagement using just Excel.

回复
Alexej Simakov

Software Test Engineer

1 年

In real world examples we will most certainly face combinatorial explosion. So while thinking about all the inputs, actions, conditions and their combinations can constitute a solid preparation, we still need a good domain knowledge, undestanding of the application architecture, and understanding of the humans involved (e.g. developers and users), to make educated guesses about which scenarios are worth testing and which of them may deserve less effort.

James Bach

Founder of Rapid Software Testing Methodology, Instructor, Consultant

1 年

You wrote a book?

回复

要查看或添加评论,请登录

Wayne Roseberry的更多文章

  • Generic Test Cases and the Great ESC Ape

    Generic Test Cases and the Great ESC Ape

    When I imagine test cases, what I am primarily interested in is what happens in the case when a given condition occurs.…

    12 条评论
  • Lessons learned using an AI army to test Microsoft Office

    Lessons learned using an AI army to test Microsoft Office

    From 2016 until March of 2023, I was working on using AI to test desktop applications for Microsoft Office. A set of…

    37 条评论
  • Why is Re-Run a Valid Test Strategy for CI/CD?

    Why is Re-Run a Valid Test Strategy for CI/CD?

    Did I break something? In a CI/CD environment, the main question on a developer’s mind is “did I break something that…

    14 条评论
  • How Microsoft Office Integrated Early Observability Into its Engineering Processes

    How Microsoft Office Integrated Early Observability Into its Engineering Processes

    Can we see problems before our users hit them? One of the ways many modern products assess, and measure success and…

    4 条评论
  • Signals Based Software Testing

    Signals Based Software Testing

    For the last several years, I have been working on a test approach that I call "signals based testing." I define it as…

    16 条评论
  • Are you Making it, Or Testing It?

    Are you Making it, Or Testing It?

    I had a conversation with a colleague the other day, and I had mentioned the line that exists somewhere between making…

    6 条评论
  • I'm Doing TDD. Am I Testing Now?

    I'm Doing TDD. Am I Testing Now?

    Working on a personal coding project, I am using TDD, because I am thinking about maybe making the code publicly…

  • Let's compare two test approaches

    Let's compare two test approaches

    NOTE: an earlier version of this article used the terms "confirmatory" and "exploratory" to distinguish the two types…

    21 条评论
  • It’s Complicated

    It’s Complicated

    Writing tools for testing complex behaviors There is this weird, shared capability between humans and computers that…

    9 条评论
  • Titles Only Test Cases Were my Gateway Drug

    Titles Only Test Cases Were my Gateway Drug

    If someone were to ask me today for advice on a test case management strategy, the first question I would probably ask…

    14 条评论

社区洞察

其他会员也浏览了