简体   繁体   English

运行脚本时如何将信息发送到RFT回放窗口?

[英]How to send informations to RFT playback window when running scripts?

When Rational Functional Tester runs a script, it shows the current script name, line number, and method. 当Rational Functional Tester运行脚本时,它将显示当前的脚本名称,行号和方法。

Rational Functional Tester回放窗口

When I run my own code or external tools, line number and method name remain empty. 当我运行自己的代码或外部工具时,行号和方法名保持为空。

How to send these informations to the playback window? 如何将这些信息发送到播放窗口? I have some time-consuming jobs (checks on PDFs, database I/O, file transfers over network) and would like to update the status (the method name) at the beginning of each small job, to be sure that things are proceeding. 我有一些耗时的工作(检查PDF,数据库I / O,通过网络进行文件传输),并希望在每个小工作开始时更新状态(方法名称),以确保一切都在进行。

You can use the following code : 您可以使用以下代码:

 IPlaybackMonitor pbMonitor = (IPlaybackMonitor)ServiceBroker.getServiceBroker().findService(IPlaybackMonitor.class.getName());
    if ( pbMonitor != null )
        pbMonitor.setDescription(IPlaybackMonitor.RUNNING, "MyTestCode");

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM