IBM Support

How to dynamically stop the execution of the scripts upon verification point failure in Rational Functional Tester

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:

Disclaimer

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.

  1. 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).

  2. 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");
           }

       }

[{"Product":{"code":"SSJMXE","label":"IBM Rational Functional Tester"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Eclipse","Platform":[{"code":"PF033","label":"Windows"}],"Version":"8.2;8.2.0.1;8.2.0.2;8.2.1;8.2.1.1;8.2.2;8.2.2.1;8.3;8.3.0.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
16 June 2018

UID

swg21626298