Robotframework Automation With Jenkins and Xray - pipeline

From last blog, we integrate RF, Jenkins and Xray, but for now, we usually use ‘Pipeline’ way for better management. Give it a try…

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
pipeline {
agent any
stages {
stage('Test Execution'){
steps{
bat 'robot db.robot'
}
}

stage('Publish RF Test Result'){
steps {
step([
$class: 'RobotPublisher',
disableArchiveOutput: false,
logFileName: 'log.html',
otherFiles: '',
outputFileName: 'output.xml',
outputPath: '',
passThreshold: 100,
reportFileName: 'report.html',
unstableThreshold: 0
])
}
}

stage('Import Result To Xray') {
steps {
step([
$class: 'XrayImportBuilder',
endpointName: '/robot',
fixVersion: '',
importFilePath: 'output.xml',
importToSameExecution: 'true',
projectKey: 'ISR',
serverInstance: '39c998d7-e25b-4cc7-81d6-dfe14d970cac',
testPlanKey: '',
testExecKey: 'ISR-8352'
])
}
}
}s
}

After run job, the result as below:

唐胡璐 wechat
欢迎您扫一扫上面的微信公众号,订阅我的博客!
分享创造价值,您的支持将鼓励我继续前行!