Document toolboxDocument toolbox

(zh_CN) 从测试周期触发(Jenkins或Bamboo)任务

测试周期是用来存储测试执行的容器,用户可以从测试周期中手动执行测试或者触发Jenkins/Bamboo的自动化测试任务。

请按照下面的步骤来从测试周期触发Jenkins/Bamboo的自动化测试任务

  1. 打开一个测试周期
  2. 展开“自动化集成”面板。

  3. 从下拉菜单中选择一个应用(此应用配置在“(zh_CN) CI集成设置”页面里)。
  4. 指定一个在持续集成工具(CI)中存在的任务。
    1. 如果Jenkins的任务位于一个“文件夹”中,请按照这个格式来指定任务的路径:'<文件夹名>/job/<任务名称>' 。
    2. 如果Jenkins的任务是一个“参数化任务”,需要启用“这是个参数化的计划/任务吗?”选项,然后按照这个格式来指定任务的路径:<parameter1>=<value1>;<parameter2>=<value2>;...
    3. 注意这里只支持类型为“字符串参数”(String Parameter)
    4. 如果需要在Jenkins中返回测试周期信息(ID),需要在Jenkins任务参数中增加一个额外的参数"SRTCYCLE" ,然后在测试周期中指定相同的参数名"SRTCYCLE"
  5. 点击“添加按钮”

    [图例 - UG_AT08_v98_Automation_Add_Job_CN]
  6. 点击“执行”按钮以启动任务的触发:

    [Screenshot - UG_AT09_v86_Automation_Trigger_Job]
  7. 到任务执行完毕,“执行状态” 将会变为:完成。
    注意:当自动化(Jenkins或Bamboo)任务完成后,SynapseRT需要至多60秒来为测试周期中的测试执行返回结果。请点击“刷新”按钮来查看结果。


             [图例 - UG_AT09_v86_Automation_Trigger_Job_DONE_CN]

在测试周期中,那些映射了自动化脚本的测试执行的结果会自动更新。

[图例 - UG_AT10_v86_Automation_Generate_Results_CN]

对CI工具中“任务”的一些额外设置

Jenkins

synapseRT capture results from xml file artifacts from the Jenkins job, hence please make sure to configure xml artifacts using **/*.xml

[Screenshot - UG_AT11_v86_Automation_Jenkins_Job_Setting]

Bamboo

synapseRT capture results from xml file artifacts from the Bamboo plan, hence please make sure to configure xml artifacts using **/*.xml. 
Copy the xml artifacts to target folder using the configuration under 'Location' as shown in screen shot.

[Screenshot - UG_AT12_v86_Automation_Bamboo_Plan_Setting]