SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Nov 2008
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Parameter passing to testcase

    Hi all,

    hopefully somebody can help me.

    I have the following testcase
    [-] testcase TC0001 (int i)
    [-] if i == i

    if I call this testcase from a testplan in this way I get a compile error
    [-] for (int i=1; i<3; i++)
    [ ] #testcase: TC0001(i)


    if I replace i with a fixed number everything is fine
    [-] for (int i=1; i<3; i++)
    [ ] #testcase: TC0001(1)



  2. #2
    Advanced Member KishoreApplabs's Avatar
    Join Date
    Oct 2006
    Posts
    965
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Parameter passing to testcase


    Can you check what is the value stroing in i before passing the value into the testcase.

    Regards,
    Kishore

  3. #3
    Junior Member
    Join Date
    Nov 2008
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Parameter passing to testcase

    ...the problem is that the use of parameters in this way is not possible in the testplan. Is there any other possibility to use parameters and other comands like for,if, etc. in the testplan?

  4. #4
    Senior Member
    Join Date
    Nov 2006
    Posts
    312
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Parameter passing to testcase

    I am not sure

    but you can try using either main function or multitestcase to do this job
    be aware that in multitestcase you have to set the recovery system yourself

  5. #5
    Advanced Member KishoreApplabs's Avatar
    Join Date
    Oct 2006
    Posts
    965
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Parameter passing to testcase


    if it's not possible(through testplan) how it will pass'hardcode value(1)'instead of passing i value.

    Regards,
    Kishore

  6. #6
    Junior Member
    Join Date
    Jun 2008
    Location
    India
    Posts
    28
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Parameter passing to testcase

    its possible in this way :

    testdata:$input1,$input2
    testcase: Validate_001

  7. #7
    Member
    Join Date
    Sep 2006
    Posts
    204
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Parameter passing to testcase

    You can pass data to test case from test plan only through symbols.This is how the test plan should look like.

    script: mention the script file
    testcase: TC0001 ($sym)

    case1
    $sym=1
    case2
    $sym=2

 

 

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 9.38%
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 08:19 AM.

Copyright BetaSoft Inc.