Software Testing Social Network

Free Software Testing Tutorial and Quality Assurance Portal

Home Featured Articles Testing Tools IBM Rational Rational Robot Rational Robot Testing Java Applications

Rational Robot Testing Java Applications

Article Index
Rational Robot Testing Java Applications
Page 2
Page 3
Page 4
Page 5
Page 6
Page 7
All Pages

Testing JavaApplets and Applications using Rational Robot

Java is an object-oriented programming language that lets you write programs to run on any computer that implements the Java Virtual Machine (JVM). This chapter describes how to use Robot to test both Java applets running in a browser and stand-alone Java applications. It includes the following topics:

  ·                    About Robot support for Java

·                      Making Java applets and applications testable

·                      Setting up the sample Java applet

·                      Testing data in Java components

·                      Support for custom Java components

·                      Supported data tests for Java testing

·                      Testing properties of Java components

·                      Enhancing object recognition of Java components

For a good introduction to Java concepts and terminology, read the Java language overview at the following URL: http://java.sun.com/docs/overviews/java/java-overview-1.html

About Robot Support for Java

 

Rational Robot provides comprehensive support for testing  GUI components in both Java applets and stand-alone Java applications. With its Object Testing technology, Robot examines the data and properties of Java components. This means that Robot can do the following:

 

·                      Determine the names of components in your program and use those names for object recognition

·                      Capture properties of Java components with the Object Properties verification point

·                      Capture data in Java components with the Object Data verification point

Robot includes several Java-specific object types for testing Java components, including JavaPanel, JavaWindow, JavaSplitPane, JavaMenu, JavaPopupMenu, JavaTable,

JavaTableHeader, and JavaTree.

Robot scripts can be played back on a variety of Windows platforms, including Windows NT 4.0, Windows Me, Windows XP, Windows 2000, and Windows 98 and are transportable across the various Java platforms.

The following matrix presents an overview of the Java support in Robot:

 

 

For information about support for additional Java environments and foundation classes, see the Rational Web site at www.rational.com.  

Robot Support for Testing Java Applets and Applications

A Java applet is a Java program embedded inside a Web page or displayed with an applet viewer. Java applications are stand-alone programs that require a Java Virtual

Machine (JVM) in order to run. Java applications create their own windows and are not embedded inside Web pages.  

Support for Testing Java Applets

Robot provides support for testing Java applets that run in the following environments:

 

·                      Internet Explorer 4.0 or later with the Microsoft Java Virtual Machine (JVM) or with the Sun plug-in

·                      Netscape 4.x or 4.7x with the Netscape JVM or with the Sun plug-in

·                      Microsoft Appletviewer

·                      Sun Appletviewer from the Java Developer Kit (JDK) 1.1.4 or later  

Support for Testing Java Applications

 Robot provides support for testing stand-alone Java applications that run in the following environments:

 

·                      Sun JDK 1.1.4 to 1.4

·                      Sun Java Runtime Environment (JRE) 1.1.4 to 1.4

·                      Microsoft JVM (jview) 3.1

You can create Robot scripts that play back Java applications under Rational Quantify and PureCoverage.  

Supported Foundation Class Libraries

With Robot you can test Java objects that are instances of the following class libraries or objects that are derived from any of these class libraries:

 

·                      Abstract Windowing Toolkit (AWT)

AWT is a collection of core graphical user interface classes that run on any supported Java platform.  

 

·                      Java Foundation Class (JFC)

JFC is an extension to AWT that provides additional graphical user interface classes, such as:

 

Swing

Accessibility

Drag and Drop

Java-2D, Java-3D

 

 

·                      Windows Foundation Classes (WFC). Java programs using WFC components run only on Microsoft JVMs.

·                      Symantec Visual Cafe

·                      KL Group

·                      Oracle Class

          

In future releases, Rational will provide support for additional foundation class libraries. For information about the most recent enhancements, see the Rational Web site.

 

NOTE:  For information about how to enable your computer to support other foundation classes such as Swing, see Setting Up the Sample Java Applet on page 15-7.

 


  Attention! For US visitors deep discounted electronics products available! CLICK HERE to check it out.