Results 1 to 5 of 5
  1. #1

    Run a method during compile...??

    Is 4Test capable of running a method during compile?? I am looking for a way to run a piece of code running compile time, not when the objects are being Instantiated?
    N+ CNA

  2. #2
    Senior Member
    Join Date
    Sep 1999
    San Jose,CA,USA

    Re: Run a method during compile...??

    I very much doubt it. First pass is the compile phase, second is the run phase with the object code *.to created in phaseI.

    That being said there are a number of tricks I might recommend for you. If I could have more of an understanding of what you are trying to accomplish, maybee one of my tricks in that bag could be helpfull.

    Let me also acquaint you with:

    These may not be what you are looking for (I have no way of knowing) but this type of architecting, is still what makes Silk shine as a well thought out test tool.

    Again as Holmes said to Watson "Data! Data! Data! I cannot make bricks without clay!"

    (by the way in the same vein/segue I propose Gandolph the Gray to be the patron saint of QA .. with his line "You cannot pass" he is a shoe in)
    Smoke me a kipper, I'll be back for breakfast!
    Richard Weth
    Sr. QA Engineer

  3. #3

    Re: Run a method during compile...??

    Okay, this is a week old, but I've been busy of late. This one got me wondering.

    One question: why?

    You mean if you hit Alt-F9 you want something to execute?

    Or do you mean that you want something to execute long before the script actually gets around to executing?

    If the latter, Rick's got some dandy ideas. Read up on overriding the built-in recovery system with ScriptEnter, TestcaseEnter, etc.

    You could also do something really crude like declaring a global variable that calls a function and/or method.

    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">// global variable
    STRING sWorthless = MyFunction ()

    STRING MyFunction ()
    // insert whatever code you want to run
    return &quot;I'm a teapot!&quot;</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">That would actually execute before even ScriptEnter.

    - Dave
    A concerned Borland customer, a fly in the ointment, a wrench in the works.

  4. #4

    Re: Run a method during compile...??

    yeah this idea works,

    and for the why, do you really want to know???? i want to be able to do this so i can version my automation kits..........
    N+ CNA

  5. #5

    Re: Run a method during compile...??

    Okay, glad I could help.

    Beware of trying to use other global variables in your function calls from global variables. You may very well get things not having been set yet.

    - Dave
    A concerned Borland customer, a fly in the ointment, a wrench in the works.



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 06:00 PM.

Copyright BetaSoft Inc.