< Previous | Next >
Introduction: Create a functional test using Java scripting
This tutorial teaches you how to get started using Functional Tester and walks you through the major use cases for testing and performing basic operations. This tutorial uses the sample application provided with Functional Tester to perform all the tasks.
The Functional Tester tutorial is divided into 10 lessons that must be completed in sequence for the tutorial to work properly.
Learning objectivesAfter completing this tutorial, you will be able to:
- Create a functional test project and record a Java test script
- Work with verification points, object maps, and regular expressions
- Use a comparator to update a verification point
- Play back a script
- Perform regression tests
Consider printing the tutorial before you begin and using the printed copy as you work through the lessons. To print this tutorial, see Printing multiple topics and creating PDFs
Time requiredThis tutorial should take approximately 45 minutes to finish. If you explore other concepts related to this tutorial, it could take longer to complete.
PrerequisitesThis is an introductory tutorial. You should be able to perform the tasks with little or no experience with Rational Functional Tester .
Lessons in this tutorial
- Lesson 1: Set up Rational Functional Tester
IBM provides a Java Runtime Environment (JRE) that is installed and enabled for testing Java applications. Use this JRE for the tutorial. When you want to test your own Java or HTML applications, run the enabler and configure your environments and applications. For more information on these set-up tasks, see the Getting Started with Functional Tester wizard in the First Steps section of the product Welcome. For now you do not need to do anything to use the preconfigured JRE to continue.
- Lesson 2: Record a script
In this lesson, you will record a script using the Functional Tester Recording Monitor.
- Lesson 3: Create verification points
In this lesson, you will record verification points to test objects. Verification points verify that a certain action has taken place, or verify the state of an object.
- Lesson 4: Play back the script
In this lesson, you will play back the script and look at some parts of the Rational Functional Tester interface. Because the script you just recorded is the active script, that script will play back when you click the playback button.
- Lesson 5: View verification points and object maps
In this lesson, you will learn how to view and modify the properties of verification points and object maps.
- Lesson 6: Perform regression tests
In this lesson, you will execute your script on a different build. When you have a new build of an application, you can run the automated test you recorded by playing back your script on the new build. To execute your script on the new build, change the name of the application in your script. (You would not need to do this on a development project; you do it here to simulate getting a new build of the application.)
- Lesson 7: Use the Comparator to update a verification point
You can use the Verification Point Comparator to compare verification point data after you play back a script. Verification points provide a baseline of the properties or data of an object. If the verification point fails on a subsequent build of an application, you have found a defect or an intentional change to the application. If the change is intentional, you can update the information in the verification point so that the test continues to be valid for future builds.
- Lesson 8: Update the object map
In this lesson, you will fix the object recognition warning by using the object map. You will also use a regular expression for more flexible object recognition.
- Lesson 9: Change the Recognition Preferences
In the previous lesson, you saw how you can update the recognition properties of an object when they change. Another factor you can change is the recognition weights that Functional Tester uses during playback. You use the ScriptAssure® recognition preferences to set this. The label object that you tested with the second verification point can demonstrate how this works.
- Lesson 10: Use regular expressions
The last thing you will do using the object map is convert a property value to a regular expression. In this case, the regular expression provides more flexibility in the object recognition.
< Previous | Next >