Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
80
RFT scripting for negative test cases
posted

Hi All,

I have recently started using RFT.

I have to build a test script such that if there is a wrong value in the DP than too the test script should not exit but it should continue to execute for other DP values.

It should just report the error about the DP value error in the report.

Please guide me for achieving the above.

Thanking you in anticipation.

Regards,

Saurabh.

 

 

  • 6729
    Suggested Answer
    Offline posted

    Hi Saurabh,

    I think you can simpy use try-catch block as follow:

    Try
     'The line you are using the DP
     'TestMethod(DPString("DP Values")
        Catch ex As Exception
            LogTestResult("DP Fail", False)
    End Try

    I hope this will work for you

    -Ammar