Results 1 to 7 of 7
  1. #1

    How to use \"USE\" and include-files

    Could someone please explain to me how including inc-files works.

    My AUT consists of several areas for different business divisions. I wanted to structure my window declarations and tests like that:
    All common windows in the frame.inc.
    All windows for division A in A.inc which include frame.inc (use "frame.inc").
    All windows for division B in B.inc which include frame.inc (use "frame.inc").

    All tests for division A in A.t which include A.inc (use "A.inc").
    All tests for division B in B.t which include B.inc (use "B.inc").

    Somehow this does not work. All new declaration are put in A.inc no matter which testfile I work in. Test from A.t use declaration from B.inc they shouldn’t know about.

    So what's the trick here?

  2. #2

    Re: How to use \"USE\" and include-files

    We use a Master include file. The master include file is nothing but an include file with USE statements in it. Use "A.inc"
    Use "B.inc"

    We then put the master.inc file in the runtime use files path. Now you have access to all the definitions and methods you right no matter which .t you are running.

    But I use silk way different that most people. I treat it like a programming language and think outside the box.

  3. #3

    Re: How to use \"USE\" and include-files

    Thanks, but I don't want the tests to have access to all the definitions. They shall know only the definition they need to know.

  4. #4

    Re: How to use \"USE\" and include-files

    So did you get it to work? What you are trying to accomplish is completely possible.

  5. #5
    Senior Member
    Join Date
    Nov 1999
    Eagle, ID,USA

    Re: How to use \"USE\" and include-files

    You could use a compiler constant which is set in Runtime options. So people in division A would have the constant set to something like:

    sUSE_ThisFrame = "A.inc"

    and then your use statement would look something like:

    use sUSE_ThisFrame
    Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.

  6. #6

    Re: How to use \"USE\" and include-files

    Thanks for all the help.
    It wasn't really hard to find, if you know where to look.

    The runtime options had the wrong file in the "Use Files"-Section.
    I corrected this and everything worked as expected.

  7. #7

    Re: How to use \"USE\" and include-files

    Hi Dear,
    What u can do ,
    1) Check whether ur .inc files are located in ur project folder or not.if they are in some other folder copy these files to ur project folder.
    2) instead of metioning only the file name use logical path of ur .inc files for e.g. use "C:\Program Files\Borland\SilkTest\Projects\My_project\my_fram e.inc"

    Try it best of luck.
    bye take care



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 04:05 PM.

Copyright BetaSoft Inc.