SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Oct 2000
    Location
    Redlands, CA, USA
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Passing lists as arguments in Test Plan

    I'd like to create a List of STRING then pass it as an argument to a testcase in the TestPlan.

    Anyone know how I might go about doing this?

    Right now, Silk does not run the TestCase (TestPlan code snippet below):

    [-] Set Resolution = 300
    [ ] List of STRING lsDocFont = {"Arial", "Times New Roman"}
    [ ] List of STRING lsMapFont = {"Helvetica", "Times-Roman"}
    [ ]
    [ ] testcase: exportEPS ("AfricaHorn", "Positive", 300, lsDocFont, lsMapFont)



  2. #2
    Advanced Member
    Join Date
    Oct 1999
    Location
    Chicago, IL
    Posts
    652
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Passing lists as arguments in Test Plan

    You're close! Try:

    [-] Set Resolution = 300
    [ ] $lsDocFont = {"Arial", "Times New Roman"}
    [ ]
    [ ] testcase: Test("AfricaHorn", $lsData)
    [ ]

  3. #3
    Senior Member
    Join Date
    Aug 1999
    Location
    San Diego, CA USA
    Posts
    219
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Passing lists as arguments in Test Plan

    I don't quite follow the previous reply but I think the solution is in there. The trick is to use variable names that start with a dollar sign.

    I didn't figure out how to specify the data type info (LIST OF STRING) like you would in a .t file. But here's the test plan contents that I just tried and it worked. All the testcase does is a ListPrint and it did print the list as I expected.

    [-] Test a LIST OF STRING declared in the test plan
    [ ] $lsValue = {"string1", "string2", "string3"}
    [ ] script: polly.t
    [ ] testcase: TestListVariableInTestPlan ($lsValue)

  4. #4
    Senior Member
    Join Date
    Jul 1999
    Location
    Burlingame CA 94010
    Posts
    502
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Passing lists as arguments in Test Plan

    Hi,

    You can declare the variables in your test frame or test script, then pass them from the plan as arguments.

    Example

    My Test
    script: \\scripts\myscript.t
    testcase: MyReusableTest
    testdata: lsItems, sUser, lsExp

    where lsItems, sUser and lsExp are variables declared in the script or in the test frame.

    Hope this helps


    ------------------
    John W Green
    jwgreen@automationexpertise.com
    http://www.automationexpertise.com

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin 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 10:59 AM.

Copyright BetaSoft Inc.