Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

In my software engineering course, we recently (briefly) covered testing.

Over the course of the discussion some topics came up that made me wonder about the math underlying software testing (such as finer vs. coarser test sets, using equivalence classes to partition infinite input spaces into "testable" sets, etc).

Are there any resources available exploring the math behind software testing?

share|improve this question

migrated from stackoverflow.com May 24 '11 at 3:07

This question came from our site for professional and enthusiast programmers.

    
Since they are more concerned with theoretical questions, I wonder you would get a better answer at cstheory.stackexchange.com. –  rajah9 May 23 '11 at 19:32
    
@rajah there's not enough big words in this question for the cstheory site –  Steven A. Lowe May 24 '11 at 4:11
    
@Steven A. Lowe But I see that he has gotten infinitely more responses than SO. –  rajah9 May 24 '11 at 15:54
    
Software testing is very valuable (e.g. putting unit testing into practice) but its theory will always have some holes. Consider this classical example: double pihole(double value) { return (value - Math.PI) / (value - Math.PI); } which I learned from my math teacher. This code has exactly one hole, which can't be discovered automatically from black-box testing alone. In Math there is no such hole. In calculus you're allowed to close the hole if the one-sided limits are equal. –  rwong May 25 '11 at 4:29
add comment

3 Answers 3

up vote 6 down vote accepted

For a book exploring the math behind software testing ... the seminal book to get is The Art of Computer Systems Performance Analysis: Techniques for Experimental Design, Measurement, Simulation, and Modeling

While it was first published in 1991 it is still popular today because it's an applied mathematics book that focuses solely on performance analysis, simulation and measurements.

share|improve this answer
    
Great, thanks! I'll take a look. –  dckrooney May 25 '11 at 17:08
add comment

One mathematically-based approach is all pairs testing. The idea is that most bugs are activated by a single configuration option choice, and most of the remainder are activated by a certain pair of options taken simultaneously. Thus most can be caught by testing "all pairs". A mathematical explanation (with generalizations) is here:

The AETG system: an approach to testing based on combinatorial design

(there are many more such references)

share|improve this answer
add comment

Maybe "specification-based testing" also kind of answers your question. Check these Testing Modules (which I haven't used yet). They require you to write a mathy expression to specify sets of test values, rather than writing a unit test using selected single data values.

Test::Lectrotest

As the author says, this Perl Module was inspired by Haskell's Quick-Check Module. There are more links on this page, some of which are dead.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.