I’d agree with mathume. Generally, I would not recommend implementing your own. Often people try to implement things which are a lot hard than they thought and they end up introducing bugs into the test tools (then you have to have tests for the tests; where does it end).
But in the case of generating all possible variables is a fairly fundamental skill.
When you look into this the first thing you find is permutations are different from combinations. In a combinations, 1, 2, 3 is the same as 3, 2, 1. But these are two different permutations.
If you really just want something you can plug strings into and don’t care about the implementation then you can just google “permutation generator” or “combination generator”.
If you are dealing with sensitive data and don’t want to post it online, you definitely want to search for “permutation generator algorithm” then implement the algorithm locally. Having a good, local permutation generator is a good idea. Sooner or later you will have to permute sensitive data and at that time you’ll be happy you have a local program you can use.
** “At present I am working with a development team to enable automated testing of a complex rating algorithm under development within a property/casualty insurance system. The system component under test accepts several hundred independent input variables which are used to produce rating factors as output. I have had some opportunity to use [NIST-ACTS] as a means to calculate test coverage and identify missing test cases in our current population of test data. I’m pleased to report that the combinatorial coverage data has proven useful to us in identifying gaps. Eventually, I would like to use this data to extend our test coverage as well – at coverage strength 3 we’re producing a volume of test cases that should be manageable when paired with automated test data generation. I can also foresee other uses which would pair automated testing tools with [NIST-ACTS] output to improve our test coverage for other systems.”*
** “The tool is pretty easy to use, and has already reduced our planned number of tests by 20% or so.”*
** “Nice… the XML configuration can be used for both CLI and application.”*
** “Our feedback on [NIST-ACTS] is extremely positive. The tool implement in a very efficient way the algorithm of N-Wise reduction we were looking at. In fact, we would be interested in including your technology in our tool.”*
** “[NIST-ACTS] is a good application. It was easy to figure out and use. … I would use this application again.”*
** “I’ve fund it intuitive and greatly helped to reduce the test size. I’ll continue to use this tool at next opportunity.”*
** “I think that [NIST-ACTS] has been very helpful in determining test coverage for simple test cases with lots of variables.”*
** “Not only does [NIST-ACTS] handle phenomenal combinatorial complexity without breaking a sweat, it is also very easy and straightforward to use. The user interface is very well thought out, intuitive, and delightfully uncluttered.”*
Thanks for the post. I’d like to offer a couple of clarifications.
ACTS is distributed by Rick Kuhn and Raghu Kacker at NIST. Yu (Jeff) Lei, at University of Texas at Arlington, has led the development of the tool. Testcover.com is an online service for combinatorial test design also. It is a site for MoT to practice testing on Products and sites to practice testing on. And you can use it to generate test designs, of course.
Combinatorial test designs do not include all possible variables. If you try to do that, you get too many test cases right away. Combinatorial designs allow you to cover all interactions between variables with a small number of test cases. For example, for 5 variables having 3 values each, there are 3x3x3x3x3 = 243 possible test cases. But to cover the variables’ pairwise interactions, you need only 11 test cases (below).
Here, an interaction is an association of 2 variables’ values, for example, the value Friday for Variable 2 with the value cloudy for Variable 5. Those values are in test case number 4. There are 90 interactions in this example, and they’re all covered in the 11 test cases.