0% found this document useful (0 votes)
16 views60 pages

RealTime Unit Testing Document

The document outlines a series of test cases for loading various dimension tables, including Customer_Dim_HC, Customer_Ship_to_Dim_HC, and others. Each test case includes steps for verifying data load success, record count matching, data integrity, and update logic checks. The expected results for each test case include successful job execution, matching record counts, and correct data formatting without truncation.

Uploaded by

sai Charan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views60 pages

RealTime Unit Testing Document

The document outlines a series of test cases for loading various dimension tables, including Customer_Dim_HC, Customer_Ship_to_Dim_HC, and others. Each test case includes steps for verifying data load success, record count matching, data integrity, and update logic checks. The expected results for each test case include successful job execution, matching record counts, and correct data formatting without truncation.

Uploaded by

sai Charan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 60

Test Id

Test Date
Sign Off (Y/N)
Test Script Name

Description

Overall Expected
Results

Data to be Used

Step # Process Activity

1 Run Framework Job to Load Dim


Table

2 Compare Record Count

3 Compare data to verify that data is


not cutting off in target table

4 Simulate & Test SCD Update Logic


5 Update logic check

5 TARGET TABLES
Customer_Dim_HC-011818
1/18/2018
No
Customer_Dim_HC

The purpose of this test case is to test data load process to load "Customer_Dim_HC" table

The comparison needs to be done with the stage table against the Dimension loaded. Below are the list of tables w
tested as a part of this data load process: Customer_Dim_HC

Test Scenarios Covered:

1. Data gets Loaded without any errors/exceptions


2. Target Record Count matches Source Record Count.
3. Data gets loaded in correct columns without gettign truncated.

4. Data format looks correct in target table.

Stage table

Test Activity

Run framework job and check if framework jobs succeeded

Get the record count from target table and stage table and make an
observation

Check if the data is being truncated for any columns in the target table

1.Simulate a new record scenario by inserting a row in stage table 2. Update


an attribute in few of the existing records in Stage table. After perfroming
above two steps, run the frame work job again
Perform a full load into a empty target table. Capture the created_ts value.
Run the full load a second time to verfiy that no new records were inserted
and that all records were updates. Check every record to verfiy that every
record has an update_ts that cooresponds to the second full load.

1 MONTH
a
Test Owner j Evidence

Sign Off Date ###

ustomer_Dim_HC" table

against the Dimension loaded. Below are the list of tables which will be

Expected Results A
c
t
u
Framework Job runs successfully

Record Count should match


WordPad
Document

WordPad
Document
Data does not get truncated

New Records get inserted. Existing records get updated


with latest value, and both type of records have latest
update_ts
All records were updates
Source Target

addess - varchar2(255) addess - varchar2(8)


MG Road , Bangalore MG Road , Ba
stage

number cust_id 1
varchar2(50) cust_name Raj
varchar2(50) city Bangalore
targe

cust_id number 1
cust_name varchar2(50) Raj
city varchar2(5) Banga
Test Id
Test Date
Sign Off (Y/N)
Test Script Name

Description

Overall Expected
Results

Data to be Used

Step # Process Activity

1 Run Framework Job to Load Dim


Table

2 Compare Record Count

3 Compare data to verify that data is


not cutting off in target table

4 Simulate & Test SCD Update Logic


5 Update logic check
Customer_Ship_to_Dim_HC-011518
1/15/2018
No
Customer_Ship_to_Dim_HC

The purpose of this test case is to test data load process to load "Customer_Ship_To_Dim_HC" table
The comparison needs to be done with the
as a part of this data load process: Customer_Ship_to_Dim_HC

Test Scenarios Covered:

1. Data gets Loaded without any errors/exceptions


2. Target Record Count matches Source Record Count.
3. Data gets loaded in correct columns without gettign truncated.
4. Data format looks correct in target table.

Stage table

Test Activity

Run framework job and check if framework jobs succeeded

Get the record count from target table and stage table and make an
observation

Check if the data is being truncated for any columns in the target table

1.Simulate a new record scenario by inserting a row in stage table 2. Update


an attribute in few of the existing records in Stage table. After perfroming
above two steps, run the frame work job again
Perform a full load into a empty target table. Capture the created_ts value.
Run the full load a second time to verfiy that no new records were inserted
and that all records were updates. Check every record to verfiy that every
record has an update_ts that cooresponds to the second full load.
Test Owner Nataraj Author

Sign Off Date 1/15/2018 Role

ustomer_Ship_To_Dim_HC" table
The comparison needs to be done with the stage table against the Dimension loaded. Below are the list of tables which wi

4. Data format looks correct in target table.

Expected Results Actual Results Actual Results Pass/Fail


for Test Data 1 for Test Data 2

Framework Job runs successfully Pass

Record Count should match Pass

Pass

Data does not get truncated


Pass

New Records get inserted. Existing records get updated


with latest value, and both type of records have latest
update_ts
All records were updates Pass
Nataraj Evidence

ETL Architect

the list of tables which will be tested

Incident # Date
Reso
lved

WordPad
Document

WordPad
Document

D:\Users\gshanth\
Documents\
WESCO\17012018\
Inser
tUpdateCheck.xlsx
D:\Users\gshanth\
Documents\
WESCO\17012018\
Inser
tUpdateCheck.xlsx
Test Id
Test Date
Sign Off (Y/N)
Test Script Name

Description

Overall Expected
Results

Data to be Used

Step # Process Activity

1 Run Framework Job to Load Dim


Table

2 Compare Record Count

3 Compare data to verify that data is


not cutting off in target table

4 Simulate & Test SCD Update Logic


5 Update logic check
Inside_sales_020918
2/9/2018
No
UDM_Inside_sales_Dim

The purpose of this test case is to test data load process to load "UDM_Inside_Sales_Dim_HC" table
The comparison needs to be done with the
as a part of this data load process: "UDM_Inside_Sales_Dim_HC"

Test Scenarios Covered:

1. Data gets Loaded without any errors/exceptions


2. Target Record Count matches Source Record Count.
3. Data gets loaded in correct columns without gettign truncated.
4. Data format looks correct in target table.

Stage table

Test Activity

Run framework job and check if framework jobs succeeded

Get the record count from target table and stage table and make an
observation

Check if the data is being truncated for any columns in the target table

1.Simulate a new record scenario by inserting a row in stage table 2. Update


an attribute in few of the existing records in Stage table. After perfroming
above two steps, run the frame work job again
Perform a full load into a empty target table. Capture the created_ts value.
Run the full load a second time to verfiy that no new records were inserted
and that all records were updates. Check every record to verfiy that every
record has an update_ts that cooresponds to the second full load.
Test Owner Mohan Author

Sign Off Date 2/9/2018 Role

DM_Inside_Sales_Dim_HC" table
The comparison needs to be done with the stage table against the Dimension loaded. Below are the list of tables which wi

4. Data format looks correct in target table.

Expected Results Actual Results Actual Results Pass/Fail


for Test Data 1 for Test Data 2

Framework Job runs successfully Pass

Record Count should match Pass

Pass

Data does not get truncated


Pass

New Records get inserted. Existing records get updated


with latest value, and both type of records have latest
update_ts
All records were updates Pass
Mohan Evidence

ETL Architect

the list of tables which will be tested

Incident # Date
Reso
lved

D:\Users\
msoorapp\
Documents\Testing\
HC\
Inside_sa
les_HC(Rowcount
validation).doc

D:\Users\
msoorapp\
Documents\Testing\
HC\
Inside_sa
les_HC(Column
validation).docx

D:\Users\
msoorapp\
Documents\Testing\
HC\Insert and
Update validation-
Inside_Sales -
HC.xlsx
Test Id
Test Date
Sign Off (Y/N)
Test Script Name

Description

Overall Expected
Results

Data to be Used

Step # Process Activity

1 Run Framework Job to Load Dim


Table

2 Compare Record Count

3 Compare data to verify that data is


not cutting off in target table

4 Simulate & Test SCD Update Logic


5 Update logic check
Outside_sales_020918
2/9/2018
No
UDM_outside_sales_Dim

The purpose of this test case is to test data load process to load "UDM_Outside_Sales_Dim_HC" table
The comparison needs to be done with th
tested as a part of this data load process: "UDM_Outside_Sales_Dim_HC"

Test Scenarios Covered:

1. Data gets Loaded without any errors/exceptions


2. Target Record Count matches Source Record Count.
3. Data gets loaded in correct columns without gettign truncated.
4. Data format looks correct in target table.

Stage table

Test Activity

Run framework job and check if framework jobs succeeded

Get the record count from target table and stage table and make an
observation

Check if the data is being truncated for any columns in the target table

1.Simulate a new record scenario by inserting a row in stage table 2. Update


an attribute in few of the existing records in Stage table. After perfroming
above two steps, run the frame work job again
Perform a full load into a empty target table. Capture the created_ts value.
Run the full load a second time to verfiy that no new records were inserted
and that all records were updates. Check every record to verfiy that every
record has an update_ts that cooresponds to the second full load.
Test Owner Mohan Author

Sign Off Date 2/9/2018 Role

DM_Outside_Sales_Dim_HC" table
The comparison needs to be done with the stage table against the Dimension loaded. Below are the list of tables which w
im_HC"

4. Data format looks correct in target table.

Expected Results Actual Results Actual Results Pass/Fail


for Test Data 1 for Test Data 2

Framework Job runs successfully Pass

Record Count should match Pass

Pass

Data does not get truncated


Pass

New Records get inserted. Existing records get updated


with latest value, and both type of records have latest
update_ts
All records were updates Pass
Mohan Evidence

ETL Architect

e the list of tables which will be

Incident # Date
Reso
lved

D:\Users\
msoorapp\
Documents\Testing\
HC\
Outside_S
ales_HC(Row
count validation).rtf

D:\Users\
msoorapp\
Documents\Testing\
HC\
Ouside_Sa
les_HC(column
data
validation).docx

D:\Users\
msoorapp\
Documents\Testing\
HC\Insert and
Update validation -
Outside_Sales -
HC.xlsx
Test Id
Test Date
Sign Off (Y/N)
Test Script Name

Description

Overall Expected
Results

Data to be Used

Step # Process Activity

1 Run Framework Job to Load Dim


Table

2 Compare Record Count

3 Compare data to verify that data is


not cutting off in target table

4 Simulate & Test SCD Update Logic


5 Update logic check
Item_Dim_HC_011518
1/15/2018
No
Item_Dim_HC

The purpose of this test case is to test data load process to load "Item_Dim_HC" table
The comparison needs to be done with the stage table aga
this data load process: "Item_Dim_HC"

Test Scenarios Covered:

1. Data gets Loaded without any errors/exceptions


2. Target Record Count matches Source Record Count.
3. Data gets loaded in correct columns without gettign truncated.
4. Data format looks correct in target table.

Stage table

Test Activity

Run framework job and check if framework jobs succeeded

Get the record count from target table and stage table and make an
observation

Check if the data is being truncated for any columns in the target table

1.Simulate a new record scenario by inserting a row in stage table 2. Update


an attribute in few of the existing records in Stage table. After perfroming
above two steps, run the frame work job again
Perform a full load into a empty target table. Capture the created_ts value.
Run the full load a second time to verfiy that no new records were inserted
and that all records were updates. Check every record to verfiy that every
record has an update_ts that cooresponds to the second full load.
Test Owner Geo Author

Sign Off Date 1/15/2018 Role

em_Dim_HC" table
The comparison needs to be done with the stage table against the Dimension loaded. Below are the list of tables which will be tested as a

4. Data format looks correct in target table.

Expected Results Actual Results Actual Results Pass/Fail


for Test Data 1 for Test Data 2

Framework Job runs successfully Pass

Record Count should match Pass

Pass

Data does not get truncated


Pass

New Records get inserted. Existing records get updated


with latest value, and both type of records have latest
update_ts
All records were updates Pass
Geo Evidence

ETL Architect

s which will be tested as a part of

Incident # Date
Reso
lved

WordPad
Document

WordPad
Document
Test Id
Test Date
Sign Off (Y/N)
Test Script Name

Description

Overall Expected
Results

Data to be Used

Step # Process Activity

1 Run Framework Job to Load Dim


Table

2 Compare Record Count

3 Compare data to verify that data is


not cutting off in target table

4 Simulate & Test SCD Update Logic


5 Update logic check
Manufacturer_Dim_HC-011518
1/15/2018
No
Manufacturer_Dim_HC

The purpose of this test case is to test data load process to load Manufacturer_Dim_HC table
The comparison needs to be done with the stage t
part of this data load process: Manufacturer_Dim_HC

Test Scenarios Covered:

1. Data gets Loaded without any errors/exceptions


2. Target Record Count matches Source Record Count.
3. Data gets loaded in correct columns without gettign truncated.
4. Data format looks correct in target table.

Stage table

Test Activity

Run framework job and check if framework jobs succeeded

Get the record count from target table and stage table and make an
observation

Check if the data is being truncated for any columns in the target table

1.Simulate a new record scenario by inserting a row in stage table 2. Update


an attribute in few of the existing records in Stage table. After perfroming
above two steps, run the frame work job again
Perform a full load into a empty target table. Capture the created_ts value.
Run the full load a second time to verfiy that no new records were inserted
and that all records were updates. Check every record to verfiy that every
record has an update_ts that cooresponds to the second full load.
Test Owner Geo Author

Sign Off Date 1/15/2018 Role

anufacturer_Dim_HC table
The comparison needs to be done with the stage table against the Dimension loaded. Below are the list of tables which will be tes

4. Data format looks correct in target table.

Expected Results Actual Results Actual Results Pass/Fail


for Test Data 1 for Test Data 2

Framework Job runs successfully Pass

Record Count should match Pass

Pass

Data does not get truncated


Pass

New Records get inserted. Existing records get updated


with latest value, and both type of records have latest
update_ts
All records were updates Pass
Geo Evidence

ETL Architect

of tables which will be tested as a

Incident # Date
Reso
lved

WordPad
Document

WordPad
Document
Test Id
Test Date
Sign Off (Y/N)
Test Script Name

Description

Overall Expected
Results

Data to be Used

Step # Process Activity

1 Run Framework Job to Load Dim


Table

2 Compare Record Count

3 Compare data to verify that data is


not cutting off in target table
4 Dimesion/Foreign keys validation

5 Metrics validation

6 Incremental Logic Check


udm_sales_fact_HC_090218
2/9/2018
No
udm_sales_fact_HC

..

Test Scenarios Covered:

1. Data gets Loaded without any errors/exceptions


2. Target Record Count matches Source Record Count.
3. Data gets loaded in correct columns without gettign truncated.
4. Data format looks correct in target table.

Stage Fact table and Dimension tables

Test Activity

Run framework job and check if framework jobs succeeded

Get the record count from target table and stage table and make an
observation

Check if the data is being truncated for any columns in the target table
Check if all Dim keys are loaded(not null ) in fact table

Check if all metrics are loaded into the fact table and matches the source
records, including precision
1) Perform a full load into a empty target table. Capture the created_ts value.
2) Change Invoice number for one record ( this can be done on most recent
invoice by increasing the invoice number by 1 ) this is like Inserting additional
record into stage table. Run the fact load second time to verfiy that only new
record gets inserted and no records were updated. Check every record to
verfiy that every record has an update_ts that cooresponds to the first full load
Test Owner Nataraj Author

Sign Off Date 2/9/2018 Role

..

4. Data format looks correct in target table.

Expected Results Actual Results Actual Results Pass/Fail


for Test Data 1 for Test Data 2

Framework Job runs successfully Pass

Record Count should match Pass

Pass
Data does not get truncated
All Foreign keys are populated and is not a default value Pass
for all records
All Metrics fileds are populated and matches source Pass
records.
Only the new record gets inserted into fact able. Pass
Nataraj Evidence

ETL Architect
Document

Incident # Date
Reso
lved
to_char(branch_id),
customer_no,
customer_name, -Nataraj
mail_address_1,
mail_address_2,
mail_city,
mail_state,
mail_zip_code,
potential_customer,
country_code,
credit_status,
to_char(credit_limit),
industry_code,
outside_sales_no,
inside_sales_no,
sic_code,
credit_contact,
contact_area_code,
contact_phone_no,
acct_open_date,
national_acct_no,
cash_discount_flag,
to_char(cash_discount_perc),
national_acct_name,
ship_to_code,
state_code,
edi_flag,
local_duns_no,
division_duns_no,
global_duns_no,
duns_sic_code,
party_number,
GlobaDunsName,
DivisionDunsName,
LocalDunsName,
--created_ts,
--updated_ts,
party_name,
instrustry_code_descr,
customer_name_full,
mail_address_1_full,
mail_address_2_full,
credit_status_description,
classification,
outside_sales_no_full,
inside_sales_no_full,
nation_account_name,
ship_to_code_full,
flex_1,
flex_2,
flex_3,
flex_4,
flex_5,
flex_6,
flex_7,
flex_8,
flex_9,
flex_10,
datasource_num_id

You might also like