_ETLUnit_Full_Test_Class_Example

 

 

 

Full ETLUnit Test Class Example

@JoinSuite(name:'bucket_v2')

@JoinSuite(name:'aud')

@JoinSuite(name:'omc')

@Database(id: 'edw', modes: ['src'])

class gap_bucket

{

@Test

columnsloadinorder_bucket()

{

stage(

file: 'FF_BUCKET_V2.txt',

classifier: 'source'

);

        

stage(

source: 'BUCKET_V1_GAP',

connection-id: 'edw',

target-table: 'BUCKET'

);        

            

execute(

workflow: 'wkf_GAP_FILLER_CREATE_V1_BUCKET_DELTA',

folder: 'EDW_QPT_BUCKET',

context:

{

edw-connection-src: 'informatica.connections.edw.src',

edw-connection-tgt: 'informatica.connections.edw.tgt'

}

);

        

assert(

source-file: 'FF_BUCKET_V1_DELTA_20130312',

reference-file-type: 'gap_bucket'

);

}

    

@Test

Filter_bucket_Detail()

{

stage(

file: 'FF_BUCKET_V2.txt',

classifier: 'source'

);

        

stage(

source: 'BUCKET_DETAIL_V1_FIL_GAP',

connection-id: 'edw',

target-table: 'BUCKET_DETAIL'

);        

            

execute(

workflow: 'wkf_GAP_FILLER_CREATE_V1_BUCKET_DETAIL_DELTA',

folder: 'EDW_QPT_BUCKET',

context:

{

edw-connection-src: 'informatica.connections.edw.src',

edw-connection-tgt: 'informatica.connections.edw.tgt'

}

);

        

assert(

target: 'FF_BUCKET_DETAIL_FIL_V1_DELTA_20130312',

source-file:'FF_BUCKET_DETAIL_V1_DELTA_20130312',

reference-file-type: 'gap_bucket_detail'

);

}

}

Â