Question & Answer
Question
How do you dynamically stop the execution of scripts upon verification point failure in IBM Rational Functional Tester (RFT)?
Cause
The execution result would be incomplete if the script execution is made to progress further even upon the verification failure taking place.
Answer
Procedure:
All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. |
---|
- Insert the below code within the verification point.
boolean b= texttext3().performTest(Text_TextVP());
if(b==false)
{ System.out.println("VP Fails");
stop();
}
Execution of the verification point results in a Boolean value (True/False).
- Invoke the method named stop() , to stop the script execution
Example: A snippet of such code is described below.
public void testMain(Object[] args)
{
texttext3().click(atPoint(56,14));
mozillaFirefoxIBMEditionwindow().inputChars("Test");
boolean b= texttext3().performTest(Text_TextVP());
if(b==false)
{
System.out.println("VP Fails");
stop();
}
else
{
System.out.println("VP Pass");
}
}
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21626298