SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Feb 2002
    Location
    UK
    Posts
    87
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Header and Library files - advantages?

    What are the advantages of using the header file to declare the procedure in a library file?

    Our infrastructure calls the library file directly and has no use for the header. This works fine but are we getting ourselves into potential problems further down the line?

    And is there a method for having one set of header files in one place, to be referenced by all projects on >1 machine. We have 3 copies of the same .sbl file, each stored in 3 machines under C:\Program Files\Rational\Rational Test\sqabas32. This method allows all projects to see the .sbl file but only on one machine! There must be an easier way...anyone got any ideas?

  2. #2
    Senior Member
    Join Date
    Sep 2001
    Location
    Hyderabad, India
    Posts
    478
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Header and Library files - advantages?

    If I am not misunderstood, you are saying that there is no need of header files in Rational. We can call the functions directly from .sbx without header file.

    Please clarify.
    Manoj Jain
    (manojjain99@yahoo.com)
    A highly advanced bug is indistinguishable from a feature.

  3. #3
    Member
    Join Date
    Feb 2002
    Location
    UK
    Posts
    87
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Header and Library files - advantages?

    Not sure if there is 'no need' for a header file, but Robot does allow the user to add a procedure into a library file, and call it directly from the test script. It doesn't require anything .sbh related. The library file will generate a usable .sbx file. If think this approach may come back to haunt me however, hence the question.

    Cheers

  4. #4
    Senior Member
    Join Date
    Sep 2001
    Location
    Hyderabad, India
    Posts
    478
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Header and Library files - advantages?

    Until you include your header (.sbh) file into your script, how can you call the function defined in .sbl file. It is the declaration of the function in .sbh that links the test script and .sbx.
    Manoj Jain
    (manojjain99@yahoo.com)
    A highly advanced bug is indistinguishable from a feature.

  5. #5
    Junior Member
    Join Date
    Apr 2002
    Location
    GiftCertificate.com
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Header and Library files - advantages?

    I found two advantages using headers, 1 it’s a great way to categorize what functions I have available. 2: To declare global variables and constants.

    As for centralizing your scripts, when you login to Rational Test there is a “Browser” button located in “Rational Test Login” window. Click it and point it to the directory you want to access. You will also need to login to Rational Administrator and add the users like “admin” and grant them permission to either run or write scripts.

  6. #6
    Member
    Join Date
    Feb 2002
    Location
    UK
    Posts
    87
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Header and Library files - advantages?

    Manoj,

    At the top of the script, we write '$Include "LibraryProc.sbl" to reference custom functions and procedures. As far as I can see, .sbx files are created and the script calls the procedures without any problems. There are no references to .sbh files in our scripts.

    Am I making an erse of this then?

  7. #7
    Senior Member
    Join Date
    Jul 2001
    Location
    Montreal, QC, Canada
    Posts
    366
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Header and Library files - advantages?

    By including the sbl into the script you are compiling all the code in the sbl into your rec file. You might as well just add the functions/procedures in the sbl directly into your script which defies the purpose. Also the size of your repository increases, this is a good reason to only include the header file with the declarations.

    If i remember correctly, you can not step into your library when you include it directly either. You might possibly get some problems if you need to include the library into another script and your first script calls your second script (double declarations...)

    FYI, compiling the sbl creates a sbx, the sbh is a text file usually you name it the same as the library and should be included in the script (rec file), once the rec file is compiled there's another file which is compiled (it is also an sbx file in the win32 directory). For a nice help on making decisions, please see LibraryGuidelines.pdf available at RationalUsers Site (http://groups.yahoo.com/group/Ration...es/Guidelines/)

    Max

 

 

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

Copyright BetaSoft Inc.