Tom Knowlton
asked on
Hopefully "fun" problem to solve - matrix of test values
I need some help conceptualizing (and realizing) a matrix of test values.
I want to test all possible permutations for a series of 6 permissions. Each permission can be true or false.
CanCreate,CanRead,CanUpdat e,CanDelet e,CanUseWe bservice,C anRunRepor ts
I think the math is 2^6 or 64 different combinations possible:
1,0,0,0,0,0
would represent granting "Can Create" permission and no permissions on the rest.
1,1,0,0,0,0 would grant CanCreate, CanRead and no on the rest.
I want to cover every combination.
I am looking to create a simple matrix for the combinations, just a CSV file of sorts.
Here is what I have so far, but what is the correct way to do this so that no test values repeat and all combinations are represented?
If I find the answer I'll return here and post it. Until then I await your answer, gurus!
I want to test all possible permutations for a series of 6 permissions. Each permission can be true or false.
CanCreate,CanRead,CanUpdat
I think the math is 2^6 or 64 different combinations possible:
1,0,0,0,0,0
would represent granting "Can Create" permission and no permissions on the rest.
1,1,0,0,0,0 would grant CanCreate, CanRead and no on the rest.
I want to cover every combination.
I am looking to create a simple matrix for the combinations, just a CSV file of sorts.
Here is what I have so far, but what is the correct way to do this so that no test values repeat and all combinations are represented?
If I find the answer I'll return here and post it. Until then I await your answer, gurus!
private void buttonGenerateCSV_Click(object sender, EventArgs e)
{
string[] headervals = textBoxHeaderValues.Text.Split(',');
string[] validvals = textBoxValidValues.Text.Split(',');
foreach (string hs in headervals)
{
textBoxCSV.Text += hs;
foreach (string s in validvals)
{
textBoxCSV.Text += s;
}
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you for the example and for your time spent on this!
Tom
Tom
No problem. Definitely many ways to approach this problem...
ASKER
Open in new window