1.0 Field of the Invention
This invention relates to testing software, and in particular, this invention relates to a method, system and article of manufacture for testing software applications that have a text-based screen with a test tool for testing software applications that have a graphical user interface that uses objects.
2.0 Description of the Related Art
Computer systems execute many software applications. A software application can comprise millions of lines of code. Therefore, it is important for organizations that develop software applications to test their software applications prior to selling that software to customers.
A test tool is a type of software application that is used to test other software applications. The test tool helps an organization to ensure the quality of a software application.
Some test tools are designed to test software applications that provide a graphical user interface in which the objects on the graphical user interface are Java® (Registered trademark of SUN Microsystems, Inc.) objects. One such test tool is the IBM® (Registered trademark of International Business Machines Corporation) Rational® (Registered trademark of Rational Software Corporation) XDE tester™, also referred to as the IBM® Rational® Functional Tester. Many software applications for mainframe computers have a text-based screen as a user interface, and do not have a graphical user interface which comprises Java objects. A user interacts with those software applications using the text-based screen. The text-based screen comprises cells which are organized into rows and columns. Each cell is typically associated with a character. Therefore, test tools which are designed to test software applications which have a graphical user interface with Java objects cannot be used to test software application that has a text-based screen. Organizations which develop software applications having a text-based screen and software applications having a graphical user interface with Java objects typically use two different test tools—one test tool for software applications having the text-based screen and another test tool for the software applications having a graphical user interface with Java objects. However, using two different test tools is more expensive than a using a single test tool.
Therefore there is a need to allow a single test tool to test software applications that have a text-based screen and software applications that have a graphical user interface with Java objects.
To overcome the limitations in the prior art described above, and to overcome other limitations that will become apparent upon reading and understanding the present specification, various embodiments of a method, apparatus and article of manufacture that identify a boundary of a field of a text-based screen for a test tool are provided. The text-based screen is associated with a screen Java object. The text-based screen has a text area and has text-based fields in the text area. The text-based fields are associated with respective field Java objects. A screen proxy Java object is associated with the screen Java object. The screen proxy Java object is accessible to the test tool. Field proxy Java objects are associated with respective field Java objects. The field proxy Java objects are accessible to the test tool. A starting screen pixel location of the text area of the screen Java object is determined. A text-based row, a text-based starting column and a text-based ending column which is associated with one of the field Java objects that is associated with a particular field proxy Java object are determined. A field corner pixel location is determined based on the text-based row, the text-based starting column and the starting screen pixel location. A field pixel width is determined based on the text-based starting column and the text-based ending column. A field pixel height is determined based on the text-based row. The field corner pixel location, the field pixel width and the field pixel height are provided to the test tool.
In some embodiments, the properties of the field are also provided to the test tool.
In this way, a method, apparatus and article of manufacture is provided to allow single test tool to test software applications that have a text-based screen and software applications that have a graphical user interface with Java objects.
The teachings of the present invention can be readily understood by considering the following description in conjunction with the accompanying drawings, in which:
To facilitate understanding, identical reference numerals have been used, where possible, to designate identical elements that are common to some of the figures.
After considering the following description, those skilled in the art will clearly realize that the teachings of the various embodiments of the present invention can be utilized to allow a single test tool to test a software application that has a text-based screen and a software application that has a graphical user interface with Java objects.
A test tool 24 is provided. The test tool 24 is designed to test software applications having a graphical user interface with Java objects. The test tool 24 allows a user to set verification points and check various properties associated with the Java objects which are displayed in the graphical user interface. In some embodiments, the test tool 24 is the IBM® Rational® XDE tester™, also referred to as the IBM® Rational® Functional Tester. However, the present invention is not meant to be limited to the IBM® Rational® XDE tester™ or the IBM® Rational® Functional Tester and may be used with other software test tools.
An extender module 30 provides an interface between the terminal emulator 22 and the test tool 24. The extender module 30 allows the test tool 24 to be used to test software applications having a text-based screen. The text-based screen comprises fields. A field is associated with one or more rows, a starting column and an ending column. The terminal emulator 22 identifies the fields and associates a Java object with each field. The terminal emulator 22 displays the fields in the text-based screen as text, and not as Java objects. The extender module 30 provides an interface such that the fields of the text-based screen are identified to the test tool 24 which is designed to test software applications with a graphical user interface having Java objects. In some embodiments, the extender module 30 also allows various properties of the fields to be identified and provided to the test tool 24.
The memory 50 generally comprises different modalities, illustratively semiconductor memory, such as random access memory (RAM), and disk drives. In various embodiments, the memory 50 stores an operating system 70, the terminal emulator 22, the test tool 24 and the extender module 30.
In some embodiments, the network 62 is connected, via another transmission medium 72, to a remote host computer system, for example, the mainframe computer 20, which executes a software application 74 which has a text-based screen. The terminal emulator 22 is used to connect the local computer system 40 to the mainframe computer system 20 via the network interface 48 and network 62 so that the software application 74 can be accessed. In various embodiments, the software application 74 executes on the mainframe computer system 20 in, for example, a z/OS® (Registered Trademark of International Business Machines Corporation), an OS/390® (Registered Trademark of International Business Machines Corporation), an AS400® (Registered Trademark of International Business Machines Corporation), a Linux® (Registered trademark of Linus Torvalds), or an OS/400® (Registered Trademark of International Business Machines Corporation) environment.
In various embodiments, the extender module 30 comprises one or more Java classes having various methods to provide an interface between the terminal emulator 22 and the test tool 24. In various embodiments, the extender module 30 is implemented using the Java® (Registered trademark of SUN Microsystems, Inc.) programming language. In some embodiments, the extender module 30 can make use of the Java Native Interface to include code which is written in a programming language other than Java.
The terminal emulator 22 displays the text-based screen 80 of the software application 74. The test tool 24 provides a graphical user interface 82 to interact with the user. Using various embodiments of the present invention, the user can use the test tool 24 and interact with the text-based screen 80 to test the software application 74.
The terminal emulator 22 has a screen Java object 84 and one or more field Java objects 86. The screen Java object 84 is associated with the text-based screen 80. Each field Java object 86 is associated with a respective field of the text-based screen.
In the extender module 30, a screen proxy Java object 88 is associated with the screen Java object 84. The test tool 24 can access the screen proxy Java object 84. The extender module 30 also comprises one or more field proxy Java objects 90. Each field proxy Java object 90 is associated with one of the field Java objects 86. The test tool 24 can access the field proxy Java objects 90. The extender module 30 comprises various classes, additional Java objects and methods. The test tool 24 invokes particular methods of the extender module 30. In some embodiments, the extender module 30 has a getchildren method 92 to provide the screen proxy Java object and the associated field proxy Java objects to the test tool 24. The extender module 30 also comprises a getRectangle method 94 and a getFieldProperties method 96. The getRectangle method 94 provides information to define a boundary of a particular field to the test tool 24. The getFieldProperties method 96 provides information about the field properties for a particular field to the test tool 24. The test tool 24 can invoke the getchildren method 92, the getRectangle method 94 and the getFieldProperties method 96.
In various embodiments, the specific software instructions, data structures and data that implement various embodiments of the present invention are typically incorporated in the extender module 30. Generally, an embodiment of the present invention is tangibly embodied in a computer-readable medium, for example, the memory 50 and is comprised of instructions which, when executed by the processor 42, cause the computer system 40 to utilize the present invention. The memory 50 may store the software instructions, data structures and data for any of the operating system 70, terminal emulator 22, extender module 30 and test tool 24 in semiconductor memory, in disk memory, or a combination thereof.
The operating system 70 may be implemented by any conventional operating system, AIX® (Registered Trademark of International Business Machines Corporation), UNIX® (UNIX is a registered trademark of the Open Group in the United States and other countries), Windows® (Registered Trademark of Microsoft Corporation), Linux®, Solaris® (Registered trademark of Sun Microsystems Inc.) and HP-UX® (Registered trademark of Hewlett-Packard Development Company, L.P.).
In various embodiments, the present invention may be implemented as a method, apparatus, or article of manufacture using standard programming and/or engineering techniques to produce software, firmware, hardware, or any combination thereof. The term “article of manufacture” (or alternatively, “computer program product”) as used herein is intended to encompass a computer program accessible from any computer-readable device, carrier or media. In addition, the software in which various embodiments are implemented may be accessible through the transmission medium, for example, from a server over the network. The article of manufacture in which the code is implemented also encompasses transmission media, such as the network transmission line and wireless transmission media. Thus the article of manufacture also comprises the medium in which the code is embedded. Those skilled in the art will recognize that many modifications may be made to this configuration without departing from the scope of the present invention.
The exemplary computer system illustrated in
In step 120, the extender module 30 (
In step 130, a pixel location (screen.x, screen.y) representing a corner of a text area of the screen which contains the text-based fields, and a height (screen.height) and width (screen.width) in pixels of the text area containing the text-based fields is determined. The corner of the text area is typically the upper, left corner. The x-coordinate represents a horizontal pixel position on the display, and the y-coordinate represents a vertical pixel position on the display.
In step 132, a text-based row of the text-based screen is determined based on a field that is associated with the field Java object that is associated with a particular field proxy Java object. In some embodiments, the test tool indicates the particular field proxy Java object.
In step 134, a starting corner pixel location (start.x, start.y) of the field is determined based on the text-based row and the text-based starting column. In various embodiments, the starting corner pixel location is the upper, left corner of the first cell, which is in the first column, of the field. In step 136, the height of the row and the width of a column of the field is determined as follows:
row height=screen.height/number of text-based rows in the screen;
column width=screen.width/number of text-based columns in the screen.
In step 138, an ending corner pixel location (end.x, end.y) of the ending column of the field is determined based on the text-based row and the text-based column. In various embodiments, the ending corner pixel location is the upper left corner of the last cell, which is in the last column, of the field. In step 140, a starting corner of the field relative to the display is determined as follows:
fieldRect.x=screen.x+start.x;
fieldRect.y=screen.y+start.y.
In step 142, the width and height of a rectangle in pixels to surround the field are determined as follows:
fieldRect.width=char.width+end.x−start.x;
fieldRect.height=char.height+end.y−start.y.
In step 144, the values of fieldRect.x, fieldRect.y, fieldRect.width and fieldRect.height are provided to the test tool. The values fieldRect.x, fieldRect.y, fieldRect.width and fieldRect.height represent a boundary of the field associated with the field proxy Java object. The values fieldRect.x and fieldRect.y represent a particular pixel location associated with a corner of the field. The value of fieldRect.width represents the width of the field and the value of fieldRect.height represents the height of the field. In various embodiments, the test tool uses the values of fieldRect.x, fieldRect.y, fieldRect.width and fieldRect.height to identify the field on the text-based screen. For example, one test tool displays a red rectangle around the field based on the values of fieldRect.x, fieldRect.y, fieldRect.width and fieldRect.height. In this way, even though the text-based screen does not display fields as Java objects, the test tool 22 (
In some embodiments, when a field spans more than one row, each row of the field is associated with a boundary, that is, a set of values of fieldRect.x, fieldRect.y, fieldRect.width and fieldRect.height. The set of values for each row of the field is provided to the test tool.
In step 150, the properties of a field Java object associated with a particular field proxy Java object are identified. For example, the properties may comprise the color, font, and whether the field associated with the field Java object is blinking. In step 152, the properties are returned to the test tool 24 (
The foregoing detailed description of various embodiments of the invention has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise form disclosed. Many modifications and variations are possible in light of the above teachings. It is intended that the scope of the invention be limited not by this detailed description, but rather by the claims appended thereto.
Number | Name | Date | Kind |
---|---|---|---|
5475843 | Halviatti et al. | Dec 1995 | A |
5754830 | Butts et al. | May 1998 | A |
6252591 | Dockweiler et al. | Jun 2001 | B1 |
6279030 | Britton et al. | Aug 2001 | B1 |
6385769 | Lewallen | May 2002 | B1 |
6408430 | Gunter et al. | Jun 2002 | B2 |
6480895 | Gray et al. | Nov 2002 | B1 |
6505342 | Hartmann et al. | Jan 2003 | B1 |
6510468 | Hayne | Jan 2003 | B1 |
6519605 | Gilgen et al. | Feb 2003 | B1 |
6606744 | Mikurak | Aug 2003 | B1 |
6637020 | Hammond | Oct 2003 | B1 |
6678881 | Graham | Jan 2004 | B2 |
6697088 | Hollander | Feb 2004 | B1 |
6701513 | Bailey | Mar 2004 | B1 |
6915520 | Sanchez, II | Jul 2005 | B2 |
6922824 | Swetland | Jul 2005 | B2 |
6931622 | Aldrich et al. | Aug 2005 | B1 |
6989254 | Wei et al. | Jan 2006 | B2 |
6993748 | Schaefer | Jan 2006 | B2 |
7089247 | Kloos et al. | Aug 2006 | B2 |
7171650 | Fenton et al. | Jan 2007 | B2 |
7173617 | Driemeyer et al. | Feb 2007 | B2 |
7222334 | Casati et al. | May 2007 | B2 |
7266806 | Choi et al. | Sep 2007 | B2 |
20040015839 | Sarkar et al. | Jan 2004 | A1 |
Number | Date | Country | |
---|---|---|---|
20060022972 A1 | Feb 2006 | US |