Následující kód ukazuje, jak lze nahlásit selhání vlastního bodu verifikace.
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 {
/**
* Instance tohoto se vytvoří pomocí konstruktoru no-arg.
*/
public Class() {
}
/**
* U rozhraní javadoc ICustomCode2 a ITestExecutionServices vyberte volbu 'Obsah nápovědy' v
* nabídce Nápověda a vyberte volby 'Rozšíření funkčnosti Rational Performance Tester' -> 'Rozšíření provedení testu vlastním kódem'
*/
public String exec(ITestExecutionServices tes, String[] args) {
tes.getTestLogManager().reportVerificationPoint("CustomVP", VerdictEvent.VERDICT_FAIL);
return null;
}
}