GetTime Step in Step Configuration Wizard

A Get Time step retrieves the time a test script is run at and returns it in a script variable.

To add a Get Time statement step:

  1. While in the Script Steps pane, add a step by choosing the Actions > Add step... command.
  2. Select a Get Time step type, click the button to validate the selection, and specify the following parameters:
    • Run Type: A Get Time step can only be executed sequentially (Sequential).
    • Delay: A delay specifying by how much step start is delayed. A delay value is automatically set when the step is added using the Capture functionality of TestComposer.
    • Timeout: A period of time after which the step execution is considered to have timed out.
    • Ignore step: When this option is selected, the step is skipped at execution time. Selecting this option is equivalent to right-clicking a step in the Script Steps table and choosing the Exclude command from the context menu that appears
    • Description: An optional step description can be associated with the step.
    • Click Next.

  3. Define the Conditional Execution settings as explained below.
  4. Conditional Execution settings enable you to define the system conditions a script step execution is monitored for. When such a predefined condition occurs – a step error or a step timeout – an user-defined procedure is executed and an additional action is performed. For example, on encountering a step error, you could enforce the execution of a cleanup procedure and then terminate the script.

    To monitor the step for a predefined Timeout or Error condition, select the corresponding condition, then define the associated procedure – local or shared (external) – by clicking the control of the Procedure field and selecting a procedure from the the drop-down pane that appears.

    For the selected procedure you can view its defined arguments by clicking the control of the Input Arguments field, which displays a cascading table-format pane containing the argument list. To specify the actual runtime argument(s) enter the desired values in the Current Value field(s).

    Configure an additional action by clicking into additional actions column and selecting either of the following options:

    • Continue: After performing the specified procedure, the script execution continues.
    • Exit Test: After performing the specified procedure, the script execution is terminated.
    • Click Next.

    Whenever the step execution is monitored for predefined events, an icon is displayed in the step's corresponding Events selected column entry. For information on turning on the displaying of the Events selected column refer to Customizing the Script Steps Table Layout.

  5. Specify the time information to be retrieved using one or more format string(s) from those listed in Table:GeTime Format Strings
  6. Table:GeTime Format Strings

    String
    Action
    %%
    Inserts a %.
    %a
    Inserts an abbreviated weekday name (Mon, Tue, and so on.).
    %A
    Inserts a full weekday name (Monday, Tuesday, etc.).
    %b
    Inserts an abbreviated month name (Jan, Feb, etc.).
    %B
    Inserts a full month name.
    %c
    Inserts a locale-specific date and time. The format for date and time in the default "C" locale on Unix or Mac is "%a %b %d %H:%M:%S %Y".
    On Windows hosts, this value is the locale specific long date and time, as specified in the Regional Options control panel settings.
    %C
    Inserts the first two digits of the four-digit year (19 or 20).
    %d
    Inserts the day of month (01 - 31).
    %D
    Formats the date as %m/%d/%y.
    %e
    Inserts the day of month (1 - 31), no leading zeros.
    %g
    Inserts the ISO8601 year number corresponding to the ISO8601 week (%V), expressed as a two-digit year-of-the-century, with leading zero if necessary.
    %G
    Inserts the ISO8601 year number corresponding to the ISO8601 week (%V), expressed as a four-digit number.
    %h
    Inserts the abbreviated month name.
    %H
    Inserts the hour in 24-hour format (00 - 23).
    %I
    Inserts the hour in 12-hour format (01 - 12).
    %j
    Inserts the day of year (001 - 366).
    %k
    Inserts the hour in 24-hour format, without leading zeros (0 - 23).
    %l
    Inserts the hour in 12-hour format, without leading zeros (1 - 12).
    %m
    Inserts the month number (01 - 12).
    %M
    Inserts the minute (00 - 59).
    %n
    Inserts a newline.
    %p
    Inserts an AM or PM indicator.
    %r
    Formats the time in a locale-specific "meridian" format. The "meridian" format in the default "C" locale is "%I:%M:%S %p".
    %R
    Format the time as %H:%M.
    %s
    Inserts the count of seconds since the epoch, expressed as a decimal integer.
    %S
    Inserts the count of seconds (00 - 59).
    %t
    Inserts a tab.
    %T
    Formats the time as %H:%M:%S.
    %u
    Inserts the weekday number (Monday = 1, Sunday = 7).
    %U
    Inserts the week of the year (00 - 52), Sunday being the first day of the week.
    %V
    Inserts the week of the year according to ISO-8601 rules. Week 1 of a given year is the week containing 4 January.
    %w
    Inserts the weekday number (Sunday = 0, Saturday = 6).
    %W
    Inserts the week of the year (00 - 52), Monday being the first day of the week.
    %x
    Uses a locale-specific date format. The format for a date in the default "C" locale for Unix or Mac is "%m/%d/%y". On Windows, this value is the locale specific short date format, as specified in the Regional Options control panel settings.
    %X
    Uses a locale-specific 24-hour time format. The format for a 24-hour time in the default "C" locale for Unix or Mac is "%H:%M:%S". On Windows, this value is the locale- specific time format, as specified in the Regional Options control panel settings.
    %y
    Inserts the year without century (00 - 99).
    %Y
    Inserts the year with century (e.g. 1990)
    %Z
    Inserts the time zone name.

  7. Verify the step summary information and revert to a previous configuration step if needed. Click Finish.