发布新日志

  • TD自动运行WR脚本及发送邮件

    2007-10-30 18:07:33

    以下摘自http://bbs.51testing.com/viewthread.php?tid=44331&page=1#pid506937
    为了让客户机自动运行测试脚本,需要用TD启动WR脚本,以下是步骤,
    Setp 1:安装必须的插件
         欲自动运行WR需要在本机上装如下插件:
         TD add-ins页面中下载安装:TestDirector Connectivity、TestDirector System Test Remote Agent、TestDirector Client Side Setup
         欲自动运行需要winrunner在本机上装如下插件:
         XrunnerTestDirector,TDPlugInsSetup

    Step2:WR连接TD并将脚本同步至TD
         A:tool中选择Quality center connection
           在server处输入: http://TD服务器IP/tdbin  点connect
           在project connection里填写正确的domain、project、user、password 点connect .
           注意勾选上:reconnect on stratup、save password
         B:将脚本同步到TD,有很多方法,可以直接在TD中launch WR来录制脚本,也可以利用一些工具如Import Tests 来同步脚本。

    Step3:在配置自动运行的环境:
           A: 在General options->run 中够选 allow other mercury products to run tests .
           B: 在TD中已经保存相应脚本的project中进行如下操作:
               Test lab->Run Test Set->Run on host 中配置远端主机192.168...
           C:配置脚本测试集及运行环境
          首先:在test lab->exection flow-> slecct tests 选择待测试的脚本,并配置各脚本的关联关系。
            
          其次:设置定时器:在exection flow配置定时器,也可以在exection grid中完成
                  
         最后:点击run test set ,配置运行环境,最后点run或run all,所配置的脚本进入等待运行状态,定时运行。
        注意:如果是控制远端机运行脚本,必须把默认勾选的run all test locally去掉
          
        PS:以上步骤也可以在test lab的exection grid中完成。

    Step4:配置自动邮件:
         A:在TD 的SiteAdmin->td server中配置mail protocol
          B:在TD相应project的testlab->test set properties 中配置notifications项添加邮件接收人,邮件基本内容等。
         C:通过在tool->change user properties可以设置发件人的邮箱名。

    完成以上配置后,大功告成,在脚本自动运行完后,就可以接收到运行结果的邮件了。

    主要是
    A 插件要装上
    B 然后 Winrunner设置:
    1、tools =〉General Options中的Run页面勾选Allow TestDirector to run tests remotely。
    2、tools =〉Quality Center Connection 界面中设置与TD的连接。
    C TD中配置远端主机192.168...,测试链接,设置运行时间

Open Toolbar