I am trying pairwise testing and wanted Python based pairwise testing tool. I already tried AllPairs(http://pypi.python.org/pypi/AllPairs/2.0.1). It has bug when I give 10 entries in a Column. Currently using Microsoft PICT to generate pairwise combination.
Is there any tool in Python that generates pairwise combinations for large arrays?
Bug in AllPairs
If I give this
parameters = [ [ "Brand X", "Brand Y","Brand A","Brand B","Brand C","Brand D" ]
, [ "98", "NT", "2000", "XP"]
, [ "Internal", "Modem","A","B","C","D","E","F","G","H","I","J","K","L","M" ]
, [ "Salaried", "Hourly", "Part-Time", "Contr.","AA","BB","CC","DD","EE","FF","GG","HH","II" ]
, [ 6, 10, 15, 30, 60, 70, 80, 90, 100, 110, 120, 130, 140 ]
]
Output is
Brand X count is 16
Brand Y count is 122
Brand A count is 16
Brand B count is 16
Brand C count is 16
Brand D count is 15
for this
parameters = [ [ "Brand X", "Brand Y","Brand A","Brand B","Brand C","Brand D" ]
, [ "98", "NT", "2000", "XP"]
, [ "Internal", "Modem" ]
, [ "Salaried", "Hourly", "Part-Time", "Contr." ]
, [ 6, 10, 15, 30, 60 ]
]
output is
Brand X count is 5
Brand Y count is 5
Brand A count is 5
Brand B count is 5
Brand C count is 5
Brand D count is 6
I think, it is not correct working for larger array.
How about something like this?
Usage (using the
parameterslist you defined in your question):I think there is still some room for optimization (the above generator yielded slightly more results than were expected), but I think you’ll agree that it’s much shorter than using the cartesian product: