Tool Mentor: Implementing Test Components Using Rational Test RealTime
Purpose
This tool mentor describes how to implement test components using Rational
Test RealTime.
It relates to this Rational Unified Process information:
Overview
Test RealTime allows you to implement a practical, effective, and
professional test process. Test RealTime includes testing solutions for any
real-time, embedded, or networked software system, and is available for all
major native and cross software development environments and programming
languages.
Test RealTime integrates three testing tools:
- Unit Testing automates C and Ada software component testing.
- Object Testing is an object-oriented approach to behavior testing of C++
code.
- System Testing is a powerful environment for testing message-based
applications.
This tool also incorporates four observation tools: Coverage, Trace,
PurifyLT, and QuantifyLT.
The choice of which testing tool you should use with your
application depends on the development environment and the nature of the
application. For each testing tool, you need to develop a dedicated test script.
Before writing the actual tests for your application, Test RealTime requires
that you create the test project and link the project to the application under
test.
Tool Steps
To create a test script in Test RealTime, perform the following actions:
- Create a project
- Map to the application under
test
- Generate test script templates
- Develop test scripts
- Deploy virtual
testers for system testing (optional)
When Test RealTime starts, the Project Wizard offers to create a new project.
Alternatively, you can manually run the Project Wizard with the following steps:
- From the File menu, select New... .
- In the New... dialog box, select Project and click OK.
The Project Wizard provides detailed on-screen instructions that guide you
through the project creation process.
For detailed information on the Project Wizard, refer to the Rational
Test RealTime User Guide.
The application under test is made up of source files. To point the Test
RealTime project to the source files of your application, use the File
Browser.
The Project Wizard provides on-screen instructions to guide you through this
process.
Alternatively, from the Project menu, select Add to Workspace
and Add Files to select individual files or Add Folder to add an
entire directory containing the application source files.
Each particular testing tool requires that you write one or several dedicated
test scripts to run against the application under test. However, Test RealTime
simplifies this process by analyzing the source code under test (for Unit
Testing and Object Testing only) and generating test script templates based on
your application.
When a new project has just been created, the Project Wizard automatically
offers to run the Test Generation Wizard. Alternatively, from the Project
menu, select Generate Test... to run the Test Generation Wizard.
The Test Generation Wizard provides detailed on-screen instructions that
guide you through the test script template creation process.
For detailed information on the Test Generation Wizard, refer to the Rational
Test RealTime User Guide.
To write a meaningful test script that reflects functional or structural
requirements, you need to complete the test script templates generated by the
Test Generation Wizard.
In the Scripts section of the File Browser, or under the Test
node in the Test Browser, double-click on the test script that you want to
complete. This opens the Test RealTime Text Editor.
Use the Text Editor to edit and browse through your test scripts, as well as
the source code under test, by clicking corresponding nodes in the Test
Browser, the File Browser, or the Console.
For the actual methodology and syntax related to each testing tool language,
refer to the Rational Test RealTime User Guide and the Rational Test
RealTime Reference Guide.
This step only applies if you are using the System Testing tool.
Once you have developed the test script, System Testing requires that you
deploy the virtual testers to their target hosts.
- Right-click a System Testing node and select Deploy Virtual Testers...
from the context menu.
- Follow the instructions provided by the Virtual Tester Deployment Wizard. The Virtual Tester Deployment Wizard creates a Supervisor script within the
System Testing node, indicating that the test is ready to be executed.
For further information about the generated supervisor script, please refer
to the Rational Test RealTime User Guide and the Rational Test
RealTime Reference Manual.
For More Information
For detailed information on how to run the test campaign, refer to the Tool
Mentor titled Executing Test
Components Using Rational Test RealTime.
Copyright
© 1987 - 2001 Rational Software Corporation
|