Reporting custom verification point failures
You can use custom code to report a custom verification point failure.
The following code shows how to report a custom verification point failure.
package customcode;
import org.eclipse.hyades.test.common.event.VerdictEvent;
import org.eclipse.hyades.test.common.runner.model.util.Verdict;
import com.ibm.rational.test.lt.execution.core.IVerificationPoint;
import com.ibm.rational.test.lt.kernel.services.ITestExecutionServices;
/**
* @author IBM Custom Code Samples
*/
public class Class implements
com.ibm.rational.test.lt.kernel.custom.ICustomCode2 {
/**
* Instances of this will be created using the no-arg constructor.
*/
public Class() {
}
/**
* For javadoc of ICustomCode2 and ITestExecutionServices interfaces, select 'Help Contents' in the
* Help menu and select 'Extending
Rational® Performance
Tester functionality' -> 'Extending test execution with custom code'
*/
public String exec(ITestExecutionServices tes, String[] args) {
tes.getTestLogManager().reportVerificationPoint("CustomVP", VerdictEvent.VERDICT_FAIL);
return null;
}
}