Unit Testing
In unit testing what we need  do is something like below

  1. Validate source and target
               -  Analyze & validate your transformation business rules.
              -  We need review field by field from source to target and ensure that the required
                   transformation logic is applied.
                -   We generally check the source and target counts for each mapping.
  2. Analyze the success and reject rows
    -    In this stage we generally customized sql queries to check source and target.
    -    Analyze the rejected rows and build the process to handle this rejection.
  3. Calculate the load time
    -    Run the session and view the statistics
    -    We observe how much time is taken by reader and writer .
    -    We should look at lesion log and workflow log to view the load statistics
  4. Testing performance
    -    Source performance
    -    Target performance
    -    Session performance
    -    Network performance
    -    Database performance
    After unit testing we generally prepare one document  as described below
  5. UNIT TEST CASE FOR LOAN_MASRER
FUNCTIONALITY_ID FIELD_NAME DETAIL VALUE PASSED EXPECTED RESULT ACTUAL RESULT PASS/FAIL RESULT REMARK
STG_SCHM_DTLS_001

LOAN

_ID
_TYPE_ID SHOULD BE NOT NULL ,FIRST CHARACHER ALPHABET(INSCH) AND LAST 10 CHARACTER NUMERIC VALUES AND ALSO ITS LENGTH IS 16 INSCH00000000002 ACCEPT RECORD RECORD ACCEPTED PASS  
STG_SCHM_DTLS_002 LOAN_TYPE_ID REJECT WHEN , NOT NULL ,FIRST 5 CHARACHER NOT (INSCH) OR LAST 10 CHARACTER NON NUMERIC VALUES AND ALSO ITS LENGTH <>16 INSCP001000000002 REJECT RECORDRECORD REJECTED PASS RECORD INSERTED INTO REJECTED FILE WITH AN ERROR_ID &ERROR_DETAILS INTO ERROR_TABLE  
STG_SCHM_DTLS_003 LOAN_COMPANY_ID LOAN_COMPANY_ID  MUST BE NOT NULL,FIRST 4 CHRACTER ALPHABET(INCO) AND LAST 11 CHRACTER NUMERIC VALUES AND ALSO LENGTH IS 15 INCO00000000003 ACCEPT RECORD RECORD ACCEPTED PASS  
STG_SCHM_DTLS_004 LOAN_COMPANY_ID REJECT WHEN , NOT NULL ,FIRST 4 CHARACHER NOT (INCO) OR LAST 11 CHARACTER NON NUMERIC VALUES AND ALSO ITS LENGTH <>15 INSO00000060003 REJECT RECORD RECORD REJECTED PASS RECORD INSERTED INTO REJECTED FILE WITH AN ERROR_ID &ERROR_DETAILS INTO ERROR_TABLE
STG_SCHM_DTLS_005 START_DATE          START DATE SHOULD  BE  A VALID DATE 12/9/1988 ACCEPT RECORD RECORD ACCEPTED PASS  
STG_SCHM_DTLS_006 START_DATE  START DATE SHOULD NOT BE LOADED WHEN IT IS NOT A VALID DATE       33FeB/88 REJECT RECORD RECORD REJECTED PASS RECORD INSERTED INTO REJECTED FILE WITH AN ERROR_ID &ERROR_DETAILS INTO ERROR_TABLE
STG_SCHM_DTLS_007 SCHEME_DESC SCHEME-DESC SHOULD BE ALPHABETIC TYPE AUTOMOBILE ACCEPT RECORD RECORD ACCEPTED PASS  
STG_SCHM_DTLS_008
SCHEME_DESC          REJECT WHEN SCHEME DISCOUNT IS NOT ALPHABETIC TYPE MOTO124 REJECT RECORD RECORD REJECTED PASS RECORD INSERTED INTO REJECTED FILE WITH AN ERROR_ID &ERROR_DETAILS INTO ERROR_TABLE
STG_SCHM_DTLS_009 PREMIUM_PER_LACS     PREMIUM_PER_LACSSHOULD BE NUMERIC     5000 ACCEPT RECORD RECORD ACCEPTED PASS