Ideas for Unit Testing

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
Harini
Premium Member
Premium Member
Posts: 80
Joined: Tue Mar 16, 2010 1:32 am

Ideas for Unit Testing

Post by Harini »

Hi All,

I need some ideas for Unit testing our jobs. Basically, the job would have rules like this.

Code: Select all

 1) Read all the records from source 
             - If Column A = 'X' Then 
                         If Column C = 2, derive A= 23
                       Else If Column C = 3, derive A= 28
                       Else If Column C = 6, derive A= 28
                       Else If Column C = 9, derive A by performing a lookup 
                       Else If Set A= 10
              -Else Column A<> X Then
                         If Column C = 10, derive A= 27
                       Else If Column C = 3, derive A= 29
                       Else If Column C = 6, derive A= 28
                       Else If Column C = 9, derive A by performing a lookup 
                       Else If Set A= 10
etc. . The job is far more complex than this. But it highly involves, deriving a set of columns on column values of other intermediate variables, and it involves good amount of 'if' then 'else' loop.

Unit testing this in Datastage by just merely running jobs, might be tough. I would like to test it via other tools commonly used. Please share your thoughts on this.

Thanks,
Meenakshi
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There's no other way to unit test DataStage jobs than by running them. Or running a copy, in which things like database targets are replaced with, for example, text files (not always possible, but usually feasible in the early phases of testing).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply