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
rmeenakumari822
Participant
Posts: 30
Joined: Sat Oct 25, 2008 9:09 pm
Location: chennai

Testing

Post 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
priya
mdbatra
Premium Member
Premium Member
Posts: 175
Joined: Wed Oct 22, 2008 10:01 am
Location: City of London

Post 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.
Rgds,
MB
mdbatra
Premium Member
Premium Member
Posts: 175
Joined: Wed Oct 22, 2008 10:01 am
Location: City of London

Post by mdbatra »

Infact, I am seeking other options also. May be someone reply later :D
Rgds,
MB
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
rmeenakumari822
Participant
Posts: 30
Joined: Sat Oct 25, 2008 9:09 pm
Location: chennai

Post 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
priya
mdbatra
Premium Member
Premium Member
Posts: 175
Joined: Wed Oct 22, 2008 10:01 am
Location: City of London

Post by mdbatra »

I trust if you have got what "Unit Testing" means, you can always write by your own.
Rgds,
MB
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post 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.
Post Reply