SPONSORS:






User Tag List

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Junior Member
    Join Date
    Dec 2000
    Location
    scottsdale, AZ USA
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Running a testcase on multiple files...

    Hello all. I'm fairly new to Silk Test 5.0.3 but have successfully written many scripts and testcases that all work flawlessly. I apologize if this is a common question. Here is my dilemma...

    I'm running an audio application, and the testcases all involve going to the File>Open window (window declaration), opening a file, performing a function on that file (more windows declarations) and Closing the file (window declaration).

    This is the scenario in every testcase. The problem I'm having is that I need to know how to make the testcase(s) run again, but this time opening a different file and performing the same test.

    These were largely created using the wizard, and I realize that I could certainly copy-paste the language and change the "SetText" field (where the file is actually grabbed from); but I'm wanting to test nearly 300 files, and that would make the script too long.

    Any help would be greatly appreciated. Thank you in advance. It's really a wonderful program, and this knowledge would put me over the top.

    I'm a new user and evidently don't have 'access' to upload a file. I will gladly email to anyone. Feel free to email me at...

    boodahman@boodahjoomusic.com

  2. #2
    Senior Member
    Join Date
    Sep 1999
    Location
    San Jose,CA,USA
    Posts
    340
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Running a testcase on multiple files...

    Assuming I understand your question, may I suggest you employ a parameter to your test case that you reuse. Here is a very simple example useing the notepad app, where I call the same testcase Test_reuse with a different file name. This test case will be called once for each file (3 times in thie case) in the file_list. I included the frame files and test, with the main code all in one example (please don't anyone code like this!!!). In other words skip the test frames in the begining .. they are there for completness and start looking at the bottom for the important stuff.




    [This message has been edited by rick_weth (edited 12-01-2000).]
    Smoke me a kipper, I'll be back for breakfast!
    Sincerely
    Richard Weth
    Sr. QA Engineer

  3. #3
    Junior Member
    Join Date
    Dec 2000
    Location
    scottsdale, AZ USA
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Running a testcase on multiple files...

    Hey!! I just wanted to say thank you! I'm now (as we speak) reviewing your script against mine. Functionally, we are doing many of the same things (similar windows declarations, using File>Open, etc) so it should be fairly simple to apply the STRING ability to my script.

    I truly appreciate the help. I'll let you know how it turns out.


  4. #4
    Junior Member
    Join Date
    Dec 2000
    Location
    scottsdale, AZ USA
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Running a testcase on multiple files...

    Okay...here's my script...maybe this will explain it better...
    HELP PLEASE!!! Again,the problem is that I can't seem to get it to repeat the testcase using all the files in the list. It uses the last one (32-m.wav) and then stops.

    [This message has been edited by beatlejase (edited 12-06-2000).]

    [This message has been edited by beatlejase (edited 12-06-2000).]

  5. #5
    Senior Member
    Join Date
    Aug 1999
    Location
    MA
    Posts
    129
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Running a testcase on multiple files...

    I think you misinterpreted the response from Rick.

    You want to "data drive" your testcase, not use a global list variable and recursively call a testcase (not possible as you discovered).

    Do this:
    [list]
    <LI> Change testcase waveAmplify() to waveAmplify(LIST OF STRING lsFiles)
    <LI> Pass in list of filenames from .PLN file, or use Main():
    waveAmplify(lsFiles)
    <LI> replace "[-] recording" with:
    <LI> delete the code after [] ------------- This is the end...

    See how this is a data driven testcase that loops based on how many files are in lsFiles?


    [This message has been edited by styler (edited 12-06-2000).]
    Steven Tyler
    Manager - Performance Engineering

    Kronos Incorporated
    tel: +1 978 947 4219

  6. #6
    Senior Member
    Join Date
    Sep 1999
    Location
    San Jose,CA,USA
    Posts
    340
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Running a testcase on multiple files...

    beatlejase

    Styler is totally on the ball! (jeez took me
    a while to figure out how on the ball s/he is!)

    Follow h/(er,is) directions and you should be well on your way. The next Post I want to read is "Victory with Silk"!!

    Stick with it Dude! If you have more questions email me at rick_weth@yahoo.com



    [This message has been edited by rick_weth (edited 12-06-2000).]
    Smoke me a kipper, I'll be back for breakfast!
    Sincerely
    Richard Weth
    Sr. QA Engineer

  7. #7
    Senior Member
    Join Date
    Aug 1999
    Location
    MA
    Posts
    129
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Running a testcase on multiple files...

    For the record I'm Mr. Tyler.
    Steven Tyler
    Manager - Performance Engineering

    Kronos Incorporated
    tel: +1 978 947 4219

  8. #8
    Junior Member
    Join Date
    Dec 2000
    Location
    scottsdale, AZ USA
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Running a testcase on multiple files...

    Thank you. You guys are beyond terrific. I'm still having a problem. I've taken your suggestion, but now it seems that it won't even let me run because MAIN is not defined. Am I totally missing something? I apologize for the back and forth, but your help is greatly appreciated. Here's how it looks now:

    Where specifically am I making the mistake...It's so close, and yet so far. Thanks again Rick & Mr. Tyler...

    [This message has been edited by beatlejase (edited 12-07-2000).]

  9. #9
    Senior Member
    Join Date
    Sep 1999
    Location
    San Jose,CA,USA
    Posts
    340
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Running a testcase on multiple files...

    beatlejase

    Don't sweat it your doing just fine. I think the biggest misconception you have is that main is another function .. you can think of it like a seperate testcase if you like.

    You cannot embed main in a testcase .. in fact main is setup alot like in a c program where you are calling test cases from it.

    Mr. Styler wanted to make it simple for you and have the stand alone test case run with the Global list .. but I would like you to use the main statement.

    Main is very cool for a number of reasons and is what I use instead of TestOrganizer.

    Anyway turn that frown upside down .. try this and see if it does the trick!
    Also DON'T GIVE UP!!!




    [This message has been edited by rick_weth (edited 12-08-2000).]
    Smoke me a kipper, I'll be back for breakfast!
    Sincerely
    Richard Weth
    Sr. QA Engineer

  10. #10
    Junior Member
    Join Date
    Dec 2000
    Location
    scottsdale, AZ USA
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Running a testcase on multiple files...

    VICTORY!!!!!!!!!!!!!!!!!!

    THANK YOU RICK & Mr. TYLER!

    I can't begin to express the joy in FINALLY achieving this long, sought-after goal.

    You guys rock and I couldn't have done it without you. The key was in setting up the main () command BEFORE the actual testcase.

    I had misunderstood, and was placing it after the actual testcase waveAmpl () app..etc.

    So, now I'm wondering if I can actually just create another plan that simply has only the MAIN statement with the 'list of files', directing it to the other testcase...Will that work? ? ?

    (and still, the kid plugs away with questions!)

    Thanks again guys. You both epitomize what is great about humanity and forums!

    cheers.

 

 
Page 1 of 2 12 LastLast

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 11:04 AM.

Copyright BetaSoft Inc.