Results 1 to 3 of 3
  1. #1

    Determine which testcase is calling a function

    I am trying to find out if there is a way to tell what testcase is calling a function, I am trying to do this from within the function. The reason for this is I am trying to reuse as many functions as possible. Here is a sample of the Function that I am trying to replace.

    <font class="small">Code:</font><hr /><pre> [-] PortSpeedCheck()
    [ ] STRING sPortSpeed = PortAsync.ConnectionTab.PortSpeeed.GetText()
    [-] if sPortSpeed == "9600"
    [ ] Print ("Port Speed is set to {sPortSpeed}")
    [-] else if sPortSpeed == "19200"
    [ ] Print ("Port Speed for Check All Values Test is set to {sPortSpeed}")
    [-] else
    [ ] logerror ("Port Speed is set to {sPortSpeed} does not match any cases")
    </pre><hr />

    Thanks in advance for your help
    Scott Calo

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

    Re: Determine which testcase is calling a function

    GetTestCaseName() tells you the name of the testcase.
    Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.

  3. #3

    Re: Determine which testcase is calling a function

    Thanks Tony that is exactly what I needed.
    Scott Calo



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:03 PM.

Copyright BetaSoft Inc.