Logging a simple message

This example writes a text message to the execution history. The class is identical to the template except for the line in bold.

package custom;

import com.ibm.rational.test.lt.kernel.logging.IKLog;

/**
 * @author unknown
 */
public class LogSimpleMessageExample implements
		com.ibm.rational.test.lt.kernel.custom.ICustomCode {

	/**
	 * Instances of this will be created using the no-arg constructor.
	 */
	public LogSimpleMessageExample() {
	}

	/**
	 * @see com.ibm.rational.test.lt.kernel.custom.ICustomCode#exec(IKLog, java.lang.String[])
	 */
	public String exec(IKLog log, String[] args) {

		log.reportMessage("Test execution started");
		return null;
	}

}

Parent topic: Extending tests with custom Java code

Terms of use | Feedback
(C) Copyright IBM Corporation 2005. All Rights Reserved.