IBM Rational helps you easily complete automated functional testing

Source: Internet
Author: User
Ning Dejun, Senior technical specialist, IBM Rational

Introduction: This article will give readers an overview of the powerful features and ease of use of IBM Rational functional Tester, and how to help testers easily complete automated functional testing.

Release date: May 01, 2005
Level: Primary
Access Status: 1669 views
Comments: 0 (View | Add Comment-login) average score (0 ratings)
Score for this article

1 Puzzle of analytic automation test

In the field of software engineering, if there is a kind of work that makes people feel its value in pain, experience its bitterness in endless overtime, and experience its happiness in technological progress, it must be a software test. With the development of computer technology today, the wide application of automated testing tools has made people recognize the source power of testing: Optimal quality cost, testing in software development process and various quality assurance activities, which is undoubtedly the best balance between software quality cost and revenue.

When it comes to automated testing, first we need to be clear about what needs to be automated. The goal of automated testing is to effectively reduce test costs and improve test efficiency by automating test scripts that enable testers to perform more software tests faster and with more frequent tests at a higher frequency. From the cost of software testing, the cost of using test tools for software automation testing can be expressed in the following formula:

Cost of automated testing = Test Tool cost + creation cost of test scripts + maintenance cost of test scripts

Since the purpose of automated testing is to reduce test costs and improve test efficiency, the test team must, while choosing an automated test tool, increase the efficiency of the test while maximizing the overall cost of automated testing less than the cost of manual testing. As a result, the automated test tool's scripting Automation creation capability and maintainability is an important factor in measuring automated test tools.

In the actual test work, in general, we choose to automate the functional testing tools to solve the following three problems: Automated functional regression testing mass data driven software testing the whole software testing lifecycle management

In the process of choosing an automated test tool to address these issues, the main concern is the ability to create test scripts using automated test tools, ease of use of tools, programming and scalability of test scripts, Test script parameterization and integration of test work and other software lifecycle management tools as an important part of software development.

Therefore, the fundamental way to get rid of the puzzle of automated testing is to understand the nature of automated testing, to identify its own automated testing needs, to choose the right automated test tools, to help test teams improve efficiency, reduce costs, and ultimately achieve the entire process of software development process quality assurance.

Back to the top of the page

2 IBM latest Automated Function test solution: Rational Functional Tester

IBM Rational Functional Tester (RFT) is an advanced, automated feature and regression testing tool that works with testers and GUI developers. With it, novice testers can simplify complex test tasks and quickly get started; Test specialists can implement various advanced customization features by choosing an industry-standardized scripting language. Through IBM's latest patented technology, such as wizard intelligent Data driven software testing technology, improved test script reuse scriptassurance technology, etc., greatly improve the ease of use and maintainability of the script. At the same time, it provides Java and web testers for the first time with the same operating platform (Eclipse) as the developer, and truly implements a platform to unify the entire software development team by providing the perfect integration with the entire test lifecycle software of IBM Rational.

Back to the top of the page

3 easily complete automated functional testing with IBM RFT

3.1 Functional testing based on the same development platform as the developer

The biggest feature of IBM RFT is the development of the same development platform (ECLIPSE) based on developers, providing automated testing capabilities for Java and web testers. As shown in figure I, when we use RFT for software testing, we will immediately have all the features of a professional automated functional testing tool as long as we open the functional test perspective in the eclipse environment where the developer works.
Figure I, IBM Rational functional Test Working interface

The process of implementing test scripts in RFT, like most automated test tools, is based on the recorded scripting generation technology. Once we have completed the test case, simply select the test Script Recording button on the Functional Test toolbar and start the script implementation of the test case.

As shown in Figure II, the script-recorded "Select Script Assets" dialog box allows users to select predefined public test object graphs and public test data pools, or to generate private test object graphs and data pools during the script recording process. The test object graph is the key technology used by IBM to solve the successful playback of test scripts between different versions, which provides an important guarantee for the reuse of test scripts, and the test data pool is an important tool used by IBM to implement data-driven automated functional testing, using intelligent data-driven test wizards. The parameterization of test scripts is almost as easy as pie.
Figure II, "Select Script Assets" dialog box

As shown in figure three, in the Recording monitoring window of the functional test, the tester can start the tested application system according to the prompts, execute the test steps specified in the test case, and implement the recording of the test script. During the test script recording, the tester can insert the verification point and the data driven test script according to the need, the verification point is the test point that compares the actual result with the expected result in the instruction, the Automated Function test tool realizes the verification of the function requirement of the system.
Figure III, Test Script recording window

After the script recording process is complete, RFT automatically generates a test script that is described in the industry standard language Java, as follows:

import Resources.
Thirdwithdatapoolhelper;
Import com.rational.test.ft.*;
Import com.rational.test.ft.object.interfaces.*;
Import com.rational.test.ft.script.*;
Import com.rational.test.ft.value.*;
Import com.rational.test.ft.vp.*; /** * description:functional Test Script * @author Ndejun/public class Thirdwithdatapool extends Thirdwithdatapo Olhelper {/** * Script Name: <b>ThirdwithDatapool</b> * Generated: <B>2005-4-17 15:22:36&L  t;/b> * description:functional Test Script * Original host:winnt Version 5.1 build 2600 (S) * @since
		
		2005/04/17 * @author Ndejun */public void Testmain (object[] args) {startApp ("Classicsjavab");
	FRAME:CLASSICSCD Classicsjava (Any,may_exit). Close (); }
}

Java-based test scripts improve the ability to program and customize the Advanced test software, and testers can even implement various advanced testing capabilities by adding a variety of customized scripts to the helper class.

3.2 Easily implement data-driven software testing with RFT

RFT has a wizard (Wizards)-based data-driven capability test capability. During the recording of a functional test script, as shown in Figure four, we can easily select various objects on the applied graphical interface, parameterize, and implement data-driven functional regression testing by generating new data pool fields or selecting existing data fields from the data pool.
Figure IV, data-driven functional testing

While generating test scripts, RFT can also help testers establish dynamic verification points using regular expressions or data-driven methods in the verification point. Dynamic verification points are used to handle the expectation that the expected value of a common verification point changes with different input parameters. In the following example, as shown in Figure five, the total amount of the order varies with the number of items purchased, and by means of a data-driven functional test, the tester first has to parameterize the number of items purchased and the total order amount, and then edit the expected value in the verification point, replacing it with the total amount of the corresponding order in the data pool. The total amount in the verification point is the correct total amount, depending on the number of items purchased. Through simple operation, without any programming, the tester can easily realize the function of the dynamic verification point.
Figure V, generating dynamic verification points

In addition, testers can establish more flexible verification points by using regular expressions in verification points to ensure the reusability of test scripts.
The application of the regular expression in the verification point of Figure VI

3.3 Provide a variety of patented technology to improve the maintainability of the script

Using the IBM Rational Functional test Tool for Java and Web application testing, the standard Java Test scripting language provides the first layer of assurance for the reusability and scripting capabilities of test scripts. In addition, by maintaining the "test object graph", IBM provides testers with the ability to reuse the test scripts between different system versions without any programming. The test object graph is divided into two types, a common "test object graph", which can be used for all test scripts in the project, and a private "test object graph" that is used only by a single managed test script. In different versions of software development, developers will be able to change the system requirements and the various objects used to build the system being tested, so the test scripts often fail to perform regression tests between different versions. Therefore, by maintaining a common "test object graph", as shown in Figure seven, the tester can update the attribute value and the corresponding weight of the test object according to the change of the object in the applied system, so that without modifying the test script, the test script which failed will be replayed successfully. At the same time, in order to facilitate the tester's ability to modify and maintain the test object graph, RFT also provides a powerful query and query customization capability to help test script maintenance personnel to quickly find the changes in the test object for modification and maintenance work.
Figure VII, maintenance of test object graphs

Secondly, the scriptassurance patented technology provided by IBM enables testers to change the tolerance of the tool to the change of the test object in a large extent, which greatly improves the reusability of the script. Scriptassurance technology mainly uses the following two parameters: when the script playback, the tool tolerated the maximum gate value of the object difference and the attribute weight used to identify the object being tested. With this technique, testers can set the fault-tolerant level of the script playback through Eclipse's preferences, which is the gate value, as shown in Figure eight and figure nine:
Figure VIII, IBM patented technology: Scriptassurance Fault tolerance level setting

Click Advanced to see a variety of specific acceptable gate values.
Figure VIII, Scriptassurance gate value setting

Second, the tester can modify the properties and weights of the object being tested in the test object graph (as shown in Figure Seven), depending on the actual change of the object being tested. When a test script is visited, the identification score of the test object is calculated from the following formula:

int score = 0;
for (int i = 0; i < property.length ++i)
score + = (100-match (property[i)) * weight;

where match () returns the value between 0~100 according to the conformance of the property, fully conforms to return 100, completely does not conform to return 0.

The success of the test script playback depends on: Recognition score < recognition gate value. Through this technology, as shown in Figure 10, by setting the appropriate Scriptassurance gate value and setting the appropriate weights for the properties used to identify the object, even if there are multiple properties of the test object in the two regression test versions, the object may still be recognized correctly and the script may still be replayed successfully. This provides the greatest degree of flexibility for the reuse of test scripts.
Figure X, Scriptassrance technology to ensure the reuse of scripts

3.4 Perfect integration with other lifecycle management software

IBM Rational's automated functional testing tool, based on the Eclipse platform, provides the perfect integration with requirements management tools (REQUISITEPRO), modeling tools, code-level test tools, and change and configuration management tools (ClearQuest and ClearCase). This allows the system testers to work with the entire software development team on the same software platform, implement system function testing, complete the configuration management and defect tracking of test scripts.

Back to the top of the page

4 Summary

If a software tool is capable of providing robust automated test script recording and automated testing capabilities, a good solution to the maintainability of test scripts, the mass data-driven software testing and the integration of the entire software development lifecycle provides an important guarantee for reducing the quality cost of software testing, while IBM Rational functional tester is just such a tool, its appearance will make our test life more beautiful.

Back to the top of the page

5 Reference IBM Rational functional Tester Tools help evaluating automated functional testing tools by Carey Schwaber and Mike Gilpin

About the author

Ning Dejun, is now the software Department of IBM China Limited Rational senior technical specialist. In the three years of work in rational China, the company has provided software management consulting services for Huawei, ZTE, Datang Mobile, Zhejiang Mobile, Jiangsu Mobile, Wuhan Jing Lun and many other companies. Prior to this, Ning Dejun has served in Alcatel Bell Company, mainly engaged in telecommunications switches, E-commerce software analysis design and development work. Participated in the development and design of Alcatel Multiple versions of the telecom switching system, Java and XML based "Web system communication Platform" and other software projects. In software engineering, Ningde has many years of practical experience, and has a deep understanding of rational software engineering technology. At present, the main focus is on software testing technology, object-oriented visual modeling and software configuration management technology research. In software testing, has been for ZTE, Datang Mobile, China Mobile, ICBC, South Rui Power, utstarcom and other companies have conducted professional advisory services, including the host and embedded software functions, performance, reliability and test management consulting.

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.