`

Rational Functional 测试命令接口

    博客分类:
  • Test
 
阅读更多

Functional Test Command-Line Interface

Most actions that can be performed from the Functional Test graphical user interface can also be performed from the command line, including:

大多数的动作可以从Functional Test 图形用户界面执行,同时也可以从它的命令行执行,包括:

·         Record a script 记录脚本

·         Compile a script 编译脚本

·         Play back a script, passing command-line arguments to the script 通过命令行参数回放脚本

·         View and edit verification point and object map files 查看、编辑验证点和对象图文件

·         Invoke the Java/HTML enabler 涉及Java/HTML

·         Invoke the Application Configuration Tool 涉及应用配置工具

The core command line format is: 命令行的格式如下:

java <standard java options> com.rational.test.ft.rational_ft <Functional Test options>

The standard java options refer to the Java command line options such as -classpath <classpath> to set the classpath appropriately or -D to define a system property. Either the JRE associated with this command needs to be enabled by Functional Test, or the following options must be set:

·         -classpath must be specified to explicitly include the rational_ft.jar from the Functional Test install directory and

·         -Drational_ft.install.dir=<Functional Test install directory> must be set to allow Functional Test to initialize correctly.

If the JRE is enabled by Functional Test, these options are not necessary.

See the Functional Test API Reference (com/rational/test/ft/rational_ft) for a full list of the command-line options.

The more commonly used options include:

·         -datastore <datastore directory> is needed whenever a script is specified, for example with -record or -playback.

·         -record <script name> to record a new script (or in conjunction with -insertafter <line number> to insert recording into an existing script). The script name is not a file name. It is a fully qualified class name using the dot (.) character to separate package/namespace and script class name. You can use -record <script name>  to record Java or VB.NET scripts, based on the project type.

·         -playback <script name> to play back a specific Java script.

·         -edit <file> or -display <file> to edit or view a Functional Test verification point or object map. The <file> can be a complete file name (with directory path). Use double-quotes if the name or path includes space characters.

·         -enable to display the enabler GUI or enable a specific environment.

·         -appconfig to display the Application Configuration Tool.

·         -inspector to display the Test Object Inspector Tool.

Here are some examples of command-line usage:

In these examples, -classpath must point to the rational_ft.jar files.

Note: The <script-name> values use standard Java package or .NET namespace naming conventions such aspackage.MyScript or Namespace.MyScript.

Record a new script:

java -Drational_ft.install.dir=<Rational FT install directory> -classpath<classpath> com.rational.test.ft.rational_ft -datastore <directory> [-map<sharedmap>] [options] -record <script-name>

Record into an existing script, inserting before or after a given line:

java -Drational_ft.install.dir=<Rational FT install directory> -classpath<classpath> com.rational.test.ft.rational_ft -datastore <directory> [-insertbefore <line>] [-insertafter <line>] [options] -record <script-name>

Compile a script:

Note: The java compiler is no longer installed with Functional Test. You must install JRE and add the bin directory to the path.

java -Drational_ft.install.dir=<Rational FT install directory> -classpath<classpath> com.rational.test.ft.rational_ft -datastore <directory> [options] -compile <script-name>

Play back a script, passing command-line arguments <values> to the script:

java -Drational_ft.install.dir=<Rational FT install directory> -classpath<classpath> com.rational.test.ft.rational_ft -datastore <directory> -log<logname> [options] -playback <script-name> [-args <values>]

Record, compile, and play back a script:

java -Drational_ft.install.dir=<Rational FT install directory> -classpath<classpath> com.rational.test.ft.rational_ft -datastore <directory> [options] -record <script-name> -compile -playback [-args <values>]

Construct an empty script:

java -Drational_ft.install.dir=<Rational FT install directory> -classpath<classpath> com.rational.test.ft.rational_ft -datastore <directory> -map<sharedmapname> [options] -create <script-name>

Running Functional Test in unattended batch mode

If you have TestManager installed and you want to run Functional Test unattended in batch mode with a TestManager log, you must include the following options on the rational_ft command line:

-user username

The TestManager user name for login.

-password password

Optional. The TestManager password for login. Do not use this if there is no password.

-project fullpath and full projectname

The name of the TestManager project, which is preceded by its full path. This is case-sensitive.

-build build

The name of an existing TestManager build. See Note below.

-logfolder foldername

The name of an existing TestManager log folder (see Note below) or the file specification for an HTML or a text log. If you use the HTML or text log folder name, you do not need to specify the build.

Note: If you want to create a TestManager log, make sure you create the TestManager build and the TestManager log folders first. See the note about TestManager integration at the end of this topic. If these two folders do not exist, execution will fail when you run Functional Test unattended in batch mode.

-log logname

The name of the TestManager, HTML or text log. If you use the HTML or text log name, you do not need to specify the build.

Example:

java -Drational_ft.install.dir="C:/Program Files/IBM/Rational/Software Development Platform/6.0/FunctionalTester/eclipse/plugins/com.rational.test.ft.wswplugin_6.1.0" -classpath "C:/Program Files/IBM/Rational/Software Development Platform/6.0/FunctionalTester/eclipse/plugins/com.rational.test.ft.wswplugin_6.1.0/rational_ft.jar" com.rational.test.ft.rational_ft -datastore //My_project/AUser/RobotJProjects -user admin -project //My_project/AUser/TestManagerProjects/Test.rsp -build "Build 1" -logfolder "Default" -log "Al_SimpleClassicsA#1" -rt.log_format "TestManager" -rt.bring_up_logviewer true -playback basetests.SimpleClassicsA_01

If you do not want TestManager to display the log after playing the script, you must also include the following option on the rational_ft command line:

-rt.bring_up_logviewer false

Note About TestManager Integration

Functional Test is integrated with Rational TestManager version 2003.06.13. If you have the 2003.06.13 version of TestManager, you will be able to use the integrated features of Functional Test and TestManager. Please seeUnderstanding Functional Test Product Packaging and Integrations for important information on using the products together.

分享到:
评论

相关推荐

    Rational Functional Tester for Terminal Application

    《通过Rational Functional Tester进行终端应用程序测试》这一教程旨在介绍如何使用Rational Functional Tester及其终端应用程序扩展来高效地测试这些类型的程序。 #### 二、Rational Functional Tester简介 ...

    IBM Rational Functional Tester

    改进 Rational Functional Tester 启动应用程序的过程 基于Rational 的BS 架构软件自动化测试研究 使用Rational Functional Tester 完成自动化功能测试 详解IBM Rational Functional Tester 的工作原理

    详解IBM Rational Functional Tester 的工作原理.docx

    Rational Functional Tester (RFT) 是一款强大的自动化测试工具,主要应用于软件功能测试。它能够操控各种类型的被测应用程序,包括基于 Java、.Net、HTML 以及特定平台如 Siebel、SAP 和 Flex 的应用。要理解 RFT ...

    使用 Rational Functional Tester 给开发人员带来的好处

    如果您利用 IBM Rational Functional Tester 记录测试用例,那么您可以在通常所花费的一小部分时间内重新执行整套的回归测试。本文将向您介绍可以使用 IBM:registered: Rational:registered: Functional Tester 来...

    IBM Rational Functional Tester简介

    IBM Rational Functional Tester(RFT)是一款先进的、自动化的功能和回归测试工具,它适用于测试人员和 GUI 开发人员。使用 RFT,可以帮助测试人员轻松地完成自动化的功能测试,并提供了与开发人员同样的操作平台...

    Rational Functional Tester - Tips and Tricks

    标题与描述均提到了“Rational Functional Tester - Tips and Tricks”,这意味着文章将深入探讨Rational Functional Tester(RFT)这款自动化测试工具的实用技巧。RFT是IBM Rational Software Development ...

    Essentials of IBM Rational Functional Tester, Java Scripting

    IBM Rational Functional Tester(简称RFT)是一款强大的自动化测试工具,主要用于功能和回归测试。它支持多种应用程序和技术栈,包括但不限于Java、.NET、SAP等。通过结合对象识别和脚本语言(如Java或VBScript),...

    Internet Explorer针对Rational Functional Tester性能异常,出现错误或无法启用

    在使用IBM Rational Functional Tester(RFT)进行自动化测试时,可能会遇到与Internet Explorer浏览器的兼容性和性能问题。本文将详细探讨这些问题的症状、原因以及解决方法。 症状主要包括:在录制脚本时,...

    Internet Explorer针对Rational Functional Tester性能异常,出现错误或无法启用.docx

    在使用IBM Rational Functional Tester(RFT)进行自动化测试时,可能会遇到一些性能异常,尤其是在录制或播放基于Internet Explorer的脚本时。这个问题涉及到RFT与IE浏览器的交互,具体表现为响应速度缓慢,脚本...

    Rational Functional Tester

    Rational Functional Tester (RFT) 是一款强大的自动化测试工具,尤其适用于测试复杂的业务流程和用户界面,例如Windows和.NET应用程序。RFT允许测试人员录制、编辑和执行测试脚本,以确保软件的质量和稳定性。 本...

    Rational_Functional_Tester_的高效测试自动化技巧

    "Rational Functional Tester 的高效测试自动化技巧" Rational Functional Tester 是一种强大的测试自动化工具,旨在帮助开发者和测试者更好地进行自动化测试。在这篇文章中,我们将讨论如何使用 Rational ...

    第七章 使用 Functional Tester 进行功能回归测试(更新).doc

    【IBM Rational Functional Tester】是IBM推出的一款强大的自动化测试工具,专用于进行功能测试和回归测试。本章节将深入探讨如何使用Rational Functional Tester (RFT)进行功能回归测试,通过实际操作来巩固理论...

    IBM Rational Functional Tester 活用ガイド

    通过以上内容,我们可以看到IBM Rational Functional Tester 活用ガイド为用户提供了一系列实用的技巧和建议,旨在帮助用户更高效、准确地完成自动化测试任务。无论是新手还是经验丰富的测试工程师,都能从中...

    rational functional tester -- IBM red book

    IBM Rational Functional Tester (RFT) 是一款面向对象的自动化测试工具,它能够帮助用户对多种应用程序进行测试。该工具支持通过录制来快速生成脚本,并允许测试应用程序中的任何对象及其属性和数据。RFT 提供了两...

    使用 Rational 工具进行功能测试课程 第一章(更新).doc

    《使用Rational工具进行功能测试课程》是一门深入解析IBM Rational Functional Tester的教程,特别针对具有软件测试基础知识的测试人员和学生。Rational Functional Tester是一款强大的自动化工具,专门用于GUI和Web...

    基于RationalFunctionalTester(RFT)开发Web应用自动化测试框架.pdf

    根据文件内容,这份文档是关于如何使用IBM Rational Functional Tester (RFT) 开发针对Web应用的自动化测试框架的详细指南。Rational Functional Tester 是IBM产品线中的一款自动化功能测试工具,专门用于测试基于...

    使用DOORS与Rational Rose 接口.pdf

    总体而言,IBM Rational DOORS for Rational Rose Interface的文档详细说明了接口的安装和使用方法,帮助用户在不同的软件工具之间有效地共享和管理需求与模型数据,从而提高了软件开发的整体效率。

    RFT(Rational Function tester)原厂培训教程

    此外,“开始使用IBM Rational Functional Tester”模块,引导学员从零开始设置测试环境,进行项目管理,直至完成第一个测试脚本的录制。 ### 挑战与解决方案 教程还设计了具体的挑战场景,例如“测试Java和HTML...

Global site tag (gtag.js) - Google Analytics