com.ibm.rational.test.lt.kernel.services.util

Class TESUtil



  • public class TESUtil
    extends Object
    A collection of static methods related to TestExecutionServices.
    • Constructor Summary

      Constructors 
      Constructor and Description
      TESUtil() 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      static void addNetServerTime(long time)
      Adds the given time (in milliseconds) to the NetServerTime counter for all currently active transactions whether defined in the behavior model or via Test Execution Services and custom code.
      static void raiseException(Throwable exception)
      Simulate KRaise from Test Execution Services.
      static void stopSchedule(String message)
      Stop the current schedule immediately.
      static void stopSchedule(String message, boolean showStack)
      Stop the current schedule immediately.
      static void stopSchedule(String message, int severity)
      Stop the current schedule immediately.
      static void stopSchedule(String message, int severity, boolean showStack)
      Stop the current schedule immediately.
      static void stopTest(String message)
      Stop the current instance of the running test immediately.
      static void stopTest(String message, boolean showStack)
      Stop the current instance of the running test immediately.
      static void stopTest(String message, int severity)
      Stop the current instance of the running test immediately.
      static void stopTest(String message, int severity, boolean showStack)
      Stop the current instance of the running test immediately.
      static void stopUser(String message)
      Stop the current virtual user immediately.
      static void stopUser(String message, boolean showStack)
      Stop the current virtual user immediately.
      static void stopUser(String message, int severity)
      Stop the current virtual user immediately.
      static void stopUser(String message, int severity, boolean showStack)
      Stop the current virtual user immediately.
      static void throwException(Throwable exception)
      Simulate a throw of the given exception.
    • Constructor Detail

      • TESUtil

        public TESUtil()
    • Method Detail

      • addNetServerTime

        public static void addNetServerTime(long time)
        Adds the given time (in milliseconds) to the NetServerTime counter for all currently active transactions whether defined in the behavior model or via Test Execution Services and custom code.
        Parameters:
        time - the elapsed time in milliseconds to add to the NetServerTime counter for all applicable transactions
      • raiseException

        public static void raiseException(Throwable exception)
        Simulate KRaise from Test Execution Services. Find an applicable catcher in the parent chain and execute it. Do not return until the catch actions are complete.
        Parameters:
        exception -
      • throwException

        public static void throwException(Throwable exception)
        Simulate a throw of the given exception. This method does not return.
        Parameters:
        exception -
      • stopTest

        public static void stopTest(String message)
        Stop the current instance of the running test immediately. A message event will be written to the testLog with severity of MessageEvent.ERROR. The message will include a stack trace. This method does not return.
        Parameters:
        message - The message to display in the testLog.
      • stopTest

        public static void stopTest(String message,
                    int severity)
        Stop the current instance of the running test immediately. A message event will be written to the testLog with the given severity. The message will include a stack trace. This method does not return.
        Parameters:
        message - The message to display in the testLog.
        severity - The severity to assign to the message in the testLog.
      • stopTest

        public static void stopTest(String message,
                    boolean showStack)
        Stop the current instance of the running test immediately. A message event will be written to the testLog with severity of MessageEvent.ERROR. The message will include a stack trace if the value of showStack is true. This method does not return.
        Parameters:
        message - The message to display in the testLog.
        showStack - A boolean indicating whether the message in the testLog should include the stack trace.
      • stopTest

        public static void stopTest(String message,
                    int severity,
                    boolean showStack)
        Stop the current instance of the running test immediately. A message event will be written to the testLog with the given severity. The message will include a stack trace if the value of showStack is true. This method does not return.
        Parameters:
        message - The message to display in the testLog.
        severity - The severity to assign to the message in the testLog.
        showStack - A boolean indicating whether the message in the testLog should include the stack trace.
      • stopUser

        public static void stopUser(String message)
        Stop the current virtual user immediately. A message event will be written to the testLog with severity of MessageEvent.ERROR. The message will include a stack trace. This method does not return.
        Parameters:
        message - The message to display in the testLog.
      • stopUser

        public static void stopUser(String message,
                    int severity)
        Stop the current virtual user immediately. A message event will be written to the testLog with the given severity. The message will include a stack trace. This method does not return.
        Parameters:
        message - The message to display in the testLog.
        severity - The severity to assign to the message in the testLog.
      • stopUser

        public static void stopUser(String message,
                    boolean showStack)
        Stop the current virtual user immediately. A message event will be written to the testLog with severity of MessageEvent.ERROR. The message will include a stack trace if the value of showStack is true. This method does not return.
        Parameters:
        message - The message to display in the testLog.
        showStack - A boolean indicating whether the message in the testLog should include the stack trace.
      • stopUser

        public static void stopUser(String message,
                    int severity,
                    boolean showStack)
        Stop the current virtual user immediately. A message event will be written to the testLog with the given severity. The message will include a stack trace if the value of showStack is true. This method does not return.
        Parameters:
        message - The message to display in the testLog.
        severity - The severity to assign to the message in the testLog.
        showStack - A boolean indicating whether the message in the testLog should include the stack trace.
      • stopSchedule

        public static void stopSchedule(String message)
        Stop the current schedule immediately. A message event will be written to the testLog with severity of MessageEvent.ERROR. The message will include a stack trace. This method does not return.
        Parameters:
        message - The message to display in the testLog.
      • stopSchedule

        public static void stopSchedule(String message,
                        int severity)
        Stop the current schedule immediately. A message event will be written to the testLog with the given severity. The message will include a stack trace. This method does not return.
        Parameters:
        message - The message to display in the testLog.
        severity - The severity to assign to the message in the testLog.
      • stopSchedule

        public static void stopSchedule(String message,
                        boolean showStack)
        Stop the current schedule immediately. A message event will be written to the testLog with severity of MessageEvent.ERROR. The message will include a stack trace if the value of showStack is true. This method does not return.
        Parameters:
        message - The message to display in the testLog.
        showStack - A boolean indicating whether the message in the testLog should include the stack trace.
      • stopSchedule

        public static void stopSchedule(String message,
                        int severity,
                        boolean showStack)
        Stop the current schedule immediately. A message event will be written to the testLog with the given severity. The message will include a stack trace if the value of showStack is true. This method does not return.
        Parameters:
        message - The message to display in the testLog.
        severity - The severity to assign to the message in the testLog.
        showStack - A boolean indicating whether the message in the testLog should include the stack trace.
IBM Rational Performance Tester TES

© Copyright IBM Corp. 2013. All rights reserved.