Working with DevOps Test Integrations and APIs logs

To configure the HCL DevOps Test Integrations and APIs (Test Integrations and APIs) logs, including those for the RunTest command when run from the command line, update the Test Integrations and APIs logging properties file.
Note: The logs that are referred to in this topic are associated with the execution of the Test Integrations and APIs application itself, and not the Test Integrations and APIs Log action that can be added to the steps of a test.
  1. In the home installation directory of Test Integrations and APIs, locate it-logging.properties.
  2. Open it-logging.properties in a text editor.
  3. Configure the logging handlers:
    You can have Test Integrations and APIs write the logs to a console, to a file, or to both. Locate the property that configures the type of logging to use and update it as needed. For example,
    handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler
    By default, only console logging is enabled for Test Integrations and APIs.
    By default, the log files for Test Integrations and APIs are written to the logs directory that is located in the home installation directory of Test Integrations and APIs.
    Note: The naming convention of the log files has changed over the releases. Starting from version 9.2.0, the Test Integrations and APIs log file is called integration-tester*.log.
  4. Set the log level:
    Use the following properties in it-logging.properties to define the log level:
    • java.util.logging.ConsoleHandler.level: The maximum level of message that can be output to the console. Messages with a lower priority than this level are not displayed on the console.
    • java.util.logging.FileHandler.level: The maximum level of message that can be output to the log file. Messages with a lower priority than this level are not included in the log file.
    • product_packages.level: The level at which messages that are output from the corresponding packages are generated. It is typical for all packages to be set at the same level.
    Set the properties to any of the following built-in log levels: SEVERE (to show the least amount of details on worst error conditions only), WARNING, INFO, CONFIG, FINE, FINER, FINEST (to display every message with more detail, most of which are not errors).
    Warning: Log levels associated with lower severity such as FINER and FINEST output large amounts of data to the logs, which might make your debugging process difficult. Therefore, do not use them unless necessary.
    Example: In this example, both console logging and file logging are enabled. Console logging is configured to log only SEVERE and WARNING messages. File logging is configured to log all possible messages, including the FINEST details. Test Integrations and APIs product packages are configured to export messages for all product classes to the logging components with the FINEST details.
    
    #------------------------------- TYPE OF LOGGING ------------------------------
    handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler
    #---------------------------- DEFAULT LOGGING LEVEL --------------------------- 
    .level = INFO
    #------------------------------ CONSOLE LOGGING -------------------------------
    java.util.logging.ConsoleHandler.level = WARNING
    #------------------------------- FILE LOGGING ---------------------------------
    java.util.logging.FileHandler.level = FINEST
    java.util.logging.FileHandler.pattern = %b/logs/integration-tester-%u.log
    java.util.logging.FileHandler.limit = 5000000
    java.util.logging.FileHandler.count = 1
    #------------------------------ PACKAGE LOG LEVELS ----------------------------
    product_packages.level = FINEST
    
  5. For any changes you made to the logging configuration to take effect, restart Test Integrations and APIs.

Viewing the log output on the console

Navigate to Help > About > JVM Console or press Ctrl-Shift-J. This action opens the Java console, which displays logs as they are generated when Test Integrations and APIs runs.

(OR)

Do the following steps:
  1. In the Test Integrations and APIs installation directory, locate IntegrationTester.exe (on Windows computers) or IntegratonTester executable (on non-Windows computers).
  2. Open a command prompt and run the executable file with the -console option. For example, IntegrationTester -console. Starting Test Integrations and APIs from the command line fetches the console messages into the command window.
Remember: The JVM Console is not the same as the test execution console.
Note: Only one instance of Test Integrations and APIs can be active at a time. Therefore, before running the executable from the command line, make sure that you close any previously running instance of Test Integrations and APIs.

Configuring the RunTests logs

When you run the RunTests executable or Apache Ant IntegrationTester task in Test Integrations and APIs, you can use both console logging and file logging. Logging for RunTests is also controlled by the same configuration settings as for Test Integrations and APIs, by the it-logging.properties file. You must ensure that the logging configuration file specified in RunTests.ini has the same changes applied to it while setting the log level for Test Integrations and APIs.
  1. In the Test Integrations and APIs installation directory, locate RunTests.ini.
  2. Find the property labeled -Djava.util.logging.config.file and verify its value. By default, this property points to the same file as it does in IntegrationTester.ini. Therefore, no additional changes are required.

Optional: Setting the log file location and patterns

Locate the property in it-logging.properties that defines the log file patterns and update it as needed. For example, java.util.logging.FileHandler.pattern=%b/logs/integration-tester-%u.log. For information about what each substitution variables (for example, %b) means, see the comments in it-logging.properties.

Optional: Changing the name and location of the logging properties file

Change the name and location of the logging properties files as follows:
  1. Navigate to the home installation directory of Test Integrations and APIs and locate the IntegrationTester.ini file.
  2. Open IntegrationTester.ini in a text editor.
  3. Locate the property that defines the logging properties file (-Djava.util.logging.config.file) and update the value as required. For example:
    -Djava.util.logging.config.file=./C:/myfolder/logs/itLog.properties