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?
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.
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.
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.
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/)