How to override dataset values through Jenkins

Introduction

This article demonstrates how to override dataset values through Jenkins for cloud executions.

 

Scenario and Instructions

1- Suppose you have the data template "j_override_dataset_demo" with field "value1" and inside this template, you have dataset "j_override_dataset_demo" with value "value1" as in next screenshot.

2- Your have a simple test case that prints the dataset value to the console

3- Your execution set has the selected dataset:

4- In Jenkins:

A. add dataset information:

B- Pipeline should be:

step([
$class: 'Subject7StepBuilder',
credentialId: "TODO",
sync: true,
reportFormat : "HTML",
delay: 0,
build : "1801",
callbackArg : "34534534",
timeout: 11000,
continueOnError: false,
executionSetConfigurations: [
[
name: "demo",
projectName: "Common",
pool: "default",
rotation: 1,
browserTypes: ["CHROME"],
dataSetSelections: [
[
name: "j_override_dataset_demo",
testCase: "jenkins_demo_dataset",
dataSets: "j_override_dataset_demo"
]
]
],
]
])

5- Trigger the execution to start and it should pick the default value which is already added in the dataset on the platform

Overriding the default Values:

 

6- A. To override these values, specify the value as below:overridden_param_ui_conf.png

B- Add pipeline and modify as needed:

step([
$class: 'Subject7StepBuilder',
credentialId: "TODO",
sync: true,
reportFormat : "HTML",
delay: 0,
build : "1801",
callbackArg : "34534534",
timeout: 11000,
continueOnError: false,
executionSetConfigurations: [
[
name: "demo",
projectName: "Common",
pool: "default",
rotation: 1,
browserTypes: ["CHROME"],
dataSetSelections: [
[
name: "j_override_dataset_demo",
testCase: "jenkins_demo_dataset",
overriddenDataSets: [
[
name: "j_override_dataset_demo",
fields: [
[
name: "value1",
value: "this value is overridden in Jenkins plugin"
]
]
]
]
]
]
],
]
])

7- Trigger the execution to start and it should pick the values you specified in Jenkins above.

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Please sign in to leave a comment.