How to test a framework that generate a file
I am assigned to produce test scenarios for a framework that is used to generate customized data file that feeds another application, here is an example.
there is a process that uses this framework to generate this output file
using this framework a user can chose to add a header a trailer none or both of them, he can also chose to select some or all of the fields of Dataelements
the full format could be as bellow
Header Dataelements trailer
Dataelements = Datafiled1 Datafield2......DatafieldN
header : depends on the user selection (yes/no)
trailer : depends on the user selection (yes/no)
Data element: multiples fields depends on the user selection (yes/no),lets say 20 fields, each fields can be choose to be added to the output file or not.
each field has about an average of 15 values.
Can you please give me an Idea about how to create a small number of test scenarios that could have almost a full coverage (because I can not produce exhaustive test cases that reach 15 times the number of data fields+3)
I started writing my test scenarios like that:
1 test scenarios: is to produce the whole file :it means header and all Datafileds and the trailer ( for data fields user to select the 1st value of each field).
2 test scenarios: produce the whole file with the header only and with some data fields with the 2nd value of each fields.
3 test scenarios : some Dataelements fields with their 3rd value and with the trailer only
Please any thoughts
thank you in advance
Re: How to test a framework that generate a file
What does "full coverage" mean to you? What is it that are you trying to "cover"? How small must your number of test cases be? (It appears that you consider 15*23 = 345 "exhaustive" and hence too many?)
I'm not sure the "15 values" that each field could have is important here, is it? Does this mean that the contents of each field could be only one of 15 distinct values? Or does it mean something else?
Is the datatype of the field significant? If so, you'll want to cover each datatype individually, and in combination.
The order of fields within the data record may be significant, or it might not.
There are combinatorial methods (see: http://en.wikipedia.org/wiki/All-pairs_testing) that can help reduce the number of tests that must be executed. But you'll have to really understand the number of parameters/dimensions involved in your test, and have to make assumptions about how many of those should be considered simultaneously to achieve your "coverage" needs.