Efficient test automation techniques for Rational functional tester

Source: Internet
Author: User

If you frequently use test automation tools, you may be familiar with the concept of testing the automation framework. Testers often look for suggestions, references, and solutions, but the framework is only half the content you need to consider. How to build your test code so that the test process for the application you are testing is most convenient, depending on the second step of the effective automation operation.

This article focuses on the first step, which helps you understand how to effectively use the tools you have. This step includes the following topics:

Objects and properties

Frequently asked questions about using browsers

Verification Point

Low-level instructions.

Script Helper Super Class

For each topic, you can find a connection to the additional information in the reference resource at the end of this article.

Attention:

The author uses the following software to write this article:

Ibm®rational®functional Tester Version 7.0.0

Microsoft®internet explorer®version 6.0.2900.2180,SP2

MICROSOFT®WINDOWS®XP PROFESSIONAL,SP2

Find alternatives to objects and their properties

Components like dialog boxes, command buttons, and labels have some information associated with them called attributes. These properties all have their own names and values. You often need to be exposed to the different properties of the object you are testing so that you can perform some type of validation, or you can follow the procedure to determine what the test script will do next. This section describes the objects, attributes, and methods that match your script.

Query and set the value of an object property

Have you ever considered dynamically comparing the previous version's value to the current value at run time? Or have you ever thought about adding a branch to your Rational functional Tester script that is based on the current value of the property contained in an object? You can retrieve the value of a property programmatically by calling the GetProperty program.

The example in code Listing 1 uses the GetProperty program to determine whether a tag contains a success message. If it is included, then you can click the OK button. If not, click the Cancel button.

Listing 1: Using the GetProperty method

if("SUCCESS".equals(dialog_htmlDialogStatic().
getProperty(".text")))
{
dialog_htmlDialogButtonOK().click();
}
else
{
dialog_htmlDialogButtonCancel().click();
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.