I have started to write some test cases today and I would really appreciate some advice here.I have to change a few XML tags in my INI file.
Let’s say I have one XML attribute which can be either “TRUE” or “FALSE”.
This attribute can apply to two different tags
<TestOneDir name="xxx" att="TRUE"/>
<TestOneDir name="xxx" att="FALSE"/>
<TestTwoDir name="xxx" att="TRUE"/>
<TestTwoDir name="xxx" att="FALSE"/>
These two tags are within the same test script. I wrote test cases to test each condition separately, but I was wondering if I should test for merging conditions, like TestOneDir to be true and TestTwoDir false.
Testing is not black and white so answer to your question is “it depends”. Often combinations can cause problems that are not seen when testing individual parameters, but you have to assess how likely this is and if it pays to test for this. You have to restrict the number of test cases always, but it’s just question where to draw the line.
Are those conditions related or independent? Do you believe that there could be problems caused by combinations? Will there be need to refactor this in the future? What’s worst that can happen if the system is not working in that case? How much longer the running of the tests takes if you add these cases?