Link to home
Start Free TrialLog in
Avatar of theneedle
theneedle

asked on

Can someone please help me write a sample test case for validating extractions from a flat file.

Hi,
I am stuck up at a point where I have to write a test case for validating data extractions from a flat file. I have no prior experience of doing this and my first project is with a release date in august. Please help me out. Any input feedback would be highly appreciated.
Avatar of SKAh
SKAh

To write a test case for flat file validation, you’ll need to know a few things about the format:

1.      Will you be validating a flat file or flat file database? Typically, the difference is that the latter usually contains one record per line and every line follows the same format. Whereas, a flat file sometimes has different formats per lines.

2.      Regardless o f the type of flat file, you will need a definition file that defines:

    a.      Each field
    b.Field delimiters
    c.      Record delimiters

3.      Types of delimiters include:

    a.      Character (comma, semi-colon, etc)
    b.      ASCII (tab character, etc.)
    c.      Escape Sequence (“\xC1” for Á, etc.)
    d.      Fixed-width (e.g., column 1-20 is “first name”; column 21-40 is “last name”, etc.)

4.      It’s a flat file, so it should be readable in some kind of text editor (UltraEdit, PSPad, etc.).

For your test approach, consider the size and frequency of the file extractions. If your flat file is small or received infrequently, importing it into Microsoft Excel for validating the extractions may be a good approach (see the risk in the next paragraph). If the file is large or frequently received, however, you may want to consider automating the process. Any test tool containing file I/O and string manipulation would be good to parse the records. Perl is good for parsing text very quickly. QuickTest Pro works great, as well.

Recognize that if you have to manipulate the flat file in order to validate its data against what is extracted, you are introducing risk of corruption or masking. Thus, it is certainly preferable to read the data rather than importing it into Excel, for example.
Avatar of theneedle

ASKER

That actually helps a lot. thank you. Now I have to just fit in these things into an excel block right ?? I will try to get them done...and if I am stuck up with something I  would definitely be back. Thank you once again.
ASKER CERTIFIED SOLUTION
Avatar of SKAh
SKAh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial