SPONSORS:






User Tag List

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Nov 2000
    Location
    Nashua, NH, USA
    Posts
    27
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Scripting to join smaller test

    I have recorded a series of small test (record/play) working from the main window of my application. All the test are working properly. The individual test work from pushbuttons that take you to associated part of the program. I now need to write scripts to link these test together to run the entire application as one test. Can someone explain how I should plan on going about this?

    ------------------
    Rowland
    Rowland

  2. #2
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,439
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Scripting to join smaller test

    Recommended is: For each testcase, there should only be one Verification statement.
    In addition to what Rick had suggested already, f you plan to merge 5 small test cases into 1 leaving one verification statement at the end, you can also do "cut and paste". Cut all the lines of codes from test cases 1-4 and paste them into test case 5 then delete test cases 1-4. Note: if this is what you plan to do most of the time, you may want to play around with Record/Actions instead of Record/Testcases so you don't have to worry about the merging of testcases.

  3. #3
    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: Scripting to join smaller test

    There are three ways I know of that will accomplish this task.

    (1) write a main function in your test and call these individual test casses. These test casses can be part of an include file that you use in the body of the main script.
    When you include a main routine in your code ONLY tests that are called via main will be executed (sounds like the tests commited a crime!) .. here is an example:

    (2) And this is my favorite .. change the test cases into functions. Put these functions into really descriptive .inc files.

    I usually have libraries of .inc files that have project names describing them.

    Then instead of calling test casses that do the same stuff over and over I chop up big areas of test functionality, into functions.

    I usually have a bunch of parameters to the functions to customize what the functions do.
    This takes time and experiance but I think this is eventually what you want to do.


    (3) Oh and there is TestOrganizer. This is "the way" a bunch of Test organizations run well defined test casses (you could include the second technique into this philosophy). I don't use it myself .. but that doesn't mean you shouldn't.



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

  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: Scripting to join smaller test

    related to the one verification idea. I use a function called VerifySafe to compare two values. It uses do..except to trap the error and report it. The test continues, however, so you can do multiple verifications in one test, each on a single line.

    Hope this helps

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

  5. #5
    Senior Member
    Join Date
    Dec 2000
    Location
    Pune, India
    Posts
    135
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Scripting to join smaller test

    Can you please forward me the (Code of) VerifySafe ( ) function

    Thanks in advance,

    Prasad Patwa

  6. #6
    Member
    Join Date
    Dec 1999
    Location
    Columbus, OH
    Posts
    78
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Scripting to join smaller test

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by John Green:
    related to the one verification idea. I use a function called VerifySafe to compare two values. It uses do..except to trap the error and report it. The test continues, however, so you can do multiple verifications in one test, each on a single line.

    Hope this helps

    <HR></BLOCKQUOTE>

    I use a similar technique, using a combination of functions and testcases to make a full test. This allows for error trapping either by do...except or by the default recovery system if an un-recovereable error occurs. The benefits I have acheived from this method are greater code re-use and less maintenance time.

 

 

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:43 AM.

Copyright BetaSoft Inc.