Poniższy kod ilustruje sposób zgłaszania niepowodzenia w niestandardowym punkcie weryfikacji.
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 Przykłady kodu niestandardowego IBM
*/
public class Class implements
com.ibm.rational.test.lt.kernel.custom.ICustomCode2 {
/**
* Instancje tej klasy zostaną utworzone za pomocą konstruktora bez argumentów.
*/
public Class() {
}
/**
* Aby uzyskać dokumentację Javadoc interfejsów ICustomCode2 i ITestExecutionServices, wybierz pozycję Spis treści pomocy w
* w menu pomocy i opcję Rozszerzanie funkcjonalności produktu Rational Performance Tester -> Rozszerzanie wykonania
testu za pomocą kodu niestandardowego
*/
public String exec(ITestExecutionServices tes, String[] args) {
tes.getTestLogManager().reportVerificationPoint("CustomVP", VerdictEvent.VERDICT_FAIL);
return null;
}
}