SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Senior Member
    Join Date
    Aug 2009
    Posts
    135
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Handling Checkpoints and Input data in Framework

    I have following steps in application :

    Window1 > Select Transaction
    Window2 > Enter Transaction Header
    Window3 > Enter Transaction Details
    Window4 > End Transaction

    I am creating 4 keywords(functions) :

    keywords with steps :

    SelectTrans for Window1:
    Step1, Value from datatable(global, param1)
    Step2, Value from datatable(global, param2)


    EnterTransHeader for Window2:
    Step1, Value from datatable(global, param3)
    Step2, Value from datatable(global, param4)
    Step3, Value from datatable(global, param5)

    EnterTransDtl for Window3:
    Step1, Value from datatable(global, param6)
    Step2, Value from datatable(global, param7)
    Step3, Value from datatable(global, param8)

    EnterTransEnd for Window4:
    Step1, Value from datatable(global, param9)
    Step2, Value from datatable(global, param10)

    test scripts :

    Test1 :
    Call SelectTrans DataTable(Global, row1)
    Call EnterTransHeader DataTable(Global, row1)
    Call EnterTransDtl DataTable(Global, row1)
    Call TransEnd DataTable(Global, row1)

    Test2 :
    Call SelectTrans DataTable(Global, row2)
    Call EnterTransHeader DataTable(Global, row2)
    Call EnterTransDtl DataTable(Global, row2)
    Call TransEnd DataTable(Global, row2)

    Now I have two questions :
    1 : I want to have a checkpoint between step1 and step2 of EnterTransHeader for Test1 and not for test2.
    2 : I want to skip step 2 of EnterTransDtl for Test 2 and not for test 1(because for test1 i want to set some data from datatable but for test2 i want to let it go with default value)

    Kindly give your views and suggestions, how you would have handeled this.
    Thanks.

  2. #2
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,555
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: Handling Checkpoints and Input data in Framework

    I don't use checkpoints so can't help with part 1.

    For 2, just put a wrapper on your input step.
    If data <> "" then input data

    So if the datatable entry for that cell is blank it will just skip the step. Then you'd need some sort of special character set aside if you actually want the field blanked out in the application instead of just ignored.

  3. #3
    Senior Member
    Join Date
    Aug 2009
    Posts
    135
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Handling Checkpoints and Input data in Framework

    Thanks for the reply.
    For question 1 : By checkpoints i dont mean QTP inbuilt checkpoints. I mean any verification point.
    eg :
    Login function
    {Set user name
    Set Pwd
    Click Ok
    }
    Datatable as :
    Username Pwd
    Invaliduser CorrectPwd
    Validuser InvalidPwd

    Now i will call Login fuction to run on both datatable rows and i want to check the max length of user name field using the same function call. I hope this clears my question.

    For question 2 : Yes i am using the wrapper
    If data <> "" then input data...
    I was just thinking if there is any better way to handle this.

    Thanks

  4. #4
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,555
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: Handling Checkpoints and Input data in Framework

    Well I you're using the datatable, I would put your expected result values in there too. Then use the same wrapper.

    If expectedresult <> "" then check result

  5. #5
    Senior Member
    Join Date
    Aug 2009
    Posts
    135
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Handling Checkpoints and Input data in Framework

    Yes, Agreed. But that is only possible at the end. i.e After Login Function call.

    Hence doing this i will be only able to test 2 scenarios, 1st Invaliduser and 2nd Invalidpwd. But testing max length still remains a question.

    Thanks

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 09:44 PM.

Copyright BetaSoft Inc.