Page 1 of 1

Testing

Posted: Sat Nov 22, 2008 9:03 pm
by rmeenakumari822
Hi,

Iam new to Datastage...
What is unit Testing? As an Datastage Developer how we will test unit testing for a particular job

source->filter->Target

can any one explain me in detail.....

Thanks

Posted: Sun Nov 23, 2008 1:52 am
by mdbatra
I do the following:
1. Generate & Run sql for the stages, in the Database( for matching no of records in the DataStage & Database)
2. If implementing complex logics(SCDs), (must) try with changing some source data values & see if the designed logic populates the target columns properly or not.
3. For Data Quality, we have a CDB comparator tool , which can check whether the exact value of the columns have been propagated or not!

Testing initially with a set of likely records(having same key columns values), has always given me advantage of removing gaps at the earliest.

Posted: Sun Nov 23, 2008 1:57 am
by mdbatra
Infact, I am seeking other options also. May be someone reply later :D

Posted: Sun Nov 23, 2008 4:47 am
by ArndW
"Unit Testing" is common to most software and not specific to DataStage. Recent years have seen great leaps in the methods used to ensure software quality and it is sometimes hard to keep up with trends. I use "extreme programming" as an example - for me it sounds like a TV show pitting computer programmers against hungry bears in a deep pit lit by flickering torches and accompanied by the sound of a crowd cheering the bear on. But, in actuality, extreme programming is a pretty neat concept!
Back to unit testing. I understand unit testing in DataStage to be a method to test single components by themselves (in isolation) - in our case it would be a single job or perhaps a group of jobs joined by a job sequence that would be a "unit" and needs to be tested. In order to perform your unit test, you would have a list of test criteria and would run that job against those criteria using sample and test data as well as code "stubs" where necessary, for example:
  • X rows of input generate Y rows of output.
    Input data "xyz" is correclty modified and sent to output B.
    Incorrect data does not cause the job to abort.
    System resource usage is as expected.
    etc.

Posted: Sun Nov 23, 2008 4:47 am
by rmeenakumari822
Hi,

Thanks for the reply

may i can know what are the possible test cases,
that can written for this job

source-> filter->target

Thanks

Posted: Sun Nov 23, 2008 1:55 pm
by mdbatra
I trust if you have got what "Unit Testing" means, you can always write by your own.

Posted: Sun Nov 23, 2008 8:20 pm
by vmcburney
At a very high level your three test cases are - Did the job work? Was the data right? What happens when something goes wrong? Under those you can have anywhere from 5 to 5,000 test cases depending on how thourough you want to be. Like testing any program you need to come up with test scenarios that cater for a range of possibilities in the source data.