Chapter2: 配置Testlink和Jenkins,將Jenkins測試結果上傳到Testlink


本系列文章見總鏈接:

總章:TestStand+Jenkins+Testlink 自動化測試平台搭建

 

Step 1. 配置Testlink 1.9.20

  創建項目project

 >> Name: MyFirstProject

 >> Prefix: MFP

增加Custom fields

選擇project("MyFirstProject"), 從主頁面,點擊“Define Custom Fields”, 點擊“Create”

 >> Name: robot

 >> Label: robot

 >> Available for: Test Case

 >> Type: string

 >> Enable on : "Test Spec Design

 >> Display on test execution : "No"

然后點擊“Add and asign (to current test project)” 

創建測試案例,賦值Custom field

點擊主頁面的“Test Specifications”,創建Test Suite, 和Test Case,

 >> Test Suite Name: TestSuite1

>> Test Case Title: TestWithTestlink  

>> Execution Type: Automated

>> robot: TestWithTestlink.1Main

 創建Test Plan

在主頁面點擊“Test Plan Management”,點擊“Create”

 >> Name: SWRelease

添加Test Case到Test Plan

在主頁面點擊“Add / Remove Test Cases”,在左側選擇Test Suite, 在右側選擇Test Case, 然后先后點擊,“adding”,"Add/Remove selected"按鈕,如下圖所示,Test Case背景為黃色即為選中。

 創建developer key

點擊頁面上面“My Settings”, 點擊“Generate a new key”

Step 2. 配置Jenkins 2.164.1

安裝Testlink 插件

下載最新的Testlink插件3.16版本。 http://updates.jenkins-ci.org/download/plugins/testlink/

在主頁面點擊Manage Jenkins->Manage Plugins->Available [Tab], 搜索“testlink”,並安裝。

配置Testlink插件

在主頁面點擊Manage Jenkins->Configure system, 並點擊Testlink Installation button “”Add”按鈕

 >> Name: testlink-1.9.20

 >> URL: http://localhost:8181/testlink-1.9.20/lib/api/xmlrpc/v1/xmlrpc.php

 >> Developer Key: ***************** <在Testlink配置部分最后一步生成的key>

創建Jenkins Job

在Jenkins主頁面,點擊“New Job”,選擇“Free Style Project”,輸入名“TestWithTestlink”

在Build節,選擇“Add a Step”, 選擇“Invoke TestLink”,

 >> TestLink Version: testlink-1.9.20

 >> Test Project Name: MyFirstProject

 >> Test Plan Name: SWRelease

 >> Build Name: ${BUILD_NUMBER}

 >> Custom Fields: robot

 >> Test Plan Custom Fields: robot

在“Reslut seeking strategy”, 選擇“Junit class name”

 >> Include Pattem: Report_Junit.xml

 >> Key Custom Field:robot

 >> Select "Include test notes"

要運行TestStand腳本還需要的其他必要配置

 

 Step 3. 執行Jenkins Job,查看Testlink結果

  在Console Ouput中查看運行日志

 

    在Testlink中查看結果,在主頁面點擊"Test Reports and Metrics",再點擊“Test Report”,再雙擊“TestSuite1”查看生成的report

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM