Pages

Sunday, March 17, 2013

How to prepare test cases?


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_IDFIELD_NAMEDETAILVALUE PASSEDEXPECTED RESULTACTUAL RESULTPASS/FAIL RESULTREMARK
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 16INSCH00000000002ACCEPT RECORDRECORD ACCEPTEDPASS 
STG_SCHM_DTLS_002LOAN_TYPE_IDREJECT WHEN , NOT NULL ,FIRST 5 CHARACHER NOT (INSCH) OR LAST 10 CHARACTER NON NUMERIC VALUES AND ALSO ITS LENGTH <>16INSCP001000000002REJECT RECORDRECORD REJECTEDPASSRECORD INSERTED INTO REJECTED FILE WITH AN ERROR_ID &ERROR_DETAILS INTO ERROR_TABLE 
STG_SCHM_DTLS_003LOAN_COMPANY_IDLOAN_COMPANY_ID  MUST BE NOT NULL,FIRST 4 CHRACTER ALPHABET(INCO) AND LAST 11 CHRACTER NUMERIC VALUES AND ALSO LENGTH IS 15INCO00000000003ACCEPT RECORDRECORD ACCEPTEDPASS 
STG_SCHM_DTLS_004LOAN_COMPANY_IDREJECT WHEN , NOT NULL ,FIRST 4 CHARACHER NOT (INCO) OR LAST 11 CHARACTER NON NUMERIC VALUES AND ALSO ITS LENGTH <>15INSO00000060003REJECT RECORDRECORD REJECTEDPASSRECORD INSERTED INTO REJECTED FILE WITH AN ERROR_ID &ERROR_DETAILS INTO ERROR_TABLE
STG_SCHM_DTLS_005START_DATE         START DATE SHOULD  BE  A VALID DATE12/9/1988ACCEPT RECORDRECORD ACCEPTEDPASS 
STG_SCHM_DTLS_006START_DATE START DATE SHOULD NOT BE LOADED WHEN IT IS NOT A VALID DATE      33FeB/88REJECT RECORDRECORD REJECTEDPASSRECORD INSERTED INTO REJECTED FILE WITH AN ERROR_ID &ERROR_DETAILS INTO ERROR_TABLE
STG_SCHM_DTLS_007SCHEME_DESCSCHEME-DESC SHOULD BE ALPHABETIC TYPEAUTOMOBILEACCEPT RECORDRECORD ACCEPTEDPASS 
STG_SCHM_DTLS_008
SCHEME_DESC         REJECT WHEN SCHEME DISCOUNT IS NOT ALPHABETIC TYPEMOTO124REJECT RECORDRECORD REJECTEDPASSRECORD INSERTED INTO REJECTED FILE WITH AN ERROR_ID &ERROR_DETAILS INTO ERROR_TABLE
STG_SCHM_DTLS_009PREMIUM_PER_LACS    PREMIUM_PER_LACSSHOULD BE NUMERIC    5000ACCEPT RECORDRECORD ACCEPTEDPASS 

No comments:

Post a Comment