-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkins_windows
123 lines (88 loc) · 3.51 KB
/
Jenkins_windows
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
pipeline{
agent any
stages{
// stage('Fetch Artifact') {
// steps {
// bat "mkdir Screenshots"
// archiveArtifacts artifacts: '${WORKSPACE}/log/*.log', fingerprint: true
// }
// }
stage("run Login test file"){
steps{
script{
//def reportPath = "${WORKSPACE}/Log"
step ([$class: ' CopyArtifact', projectName: '${WORKSPACE}', filter: '${WORKSPACE}/Log']);
// def output = bat returnStdout: true, script: "dir \"${JENKINS_HOME}\" /b /A:D"
// foldersList = output.tokenize('\n').collect() { it }
// foldersList = foldersList.drop(2)
//def workspace_link = "<a href=http://localhost:8080/job/" + JOB_NAME + "/" + BUILD_NUMBER + "/execution/node/3/ws/Locators/'>Locator</a>";
//manager.createSummary("green.gif").appendText("<h1>" + workspace_link + "</h1>", false, false, false, "blue");
// def dirOutput = bat("dir /B ${myDir}", returnStdout: true)
bat """
//echo "${reportPath}"
// echo "dirOutput"
// echo "Current workspace is ${env.WORKSPACE}"
python --version
pytest -vs Tests/test_login.py --platformname Android --udid 33766e229904 --platformversion 7.0
"""
}
}
}
stage("run Signup test file"){
steps{
bat"""
pytest -vs Tests/test_signup.py --platformname Android --udid 33766e229904 --platformversion 7.0
"""
}
}
stage("run change name test file"){
steps{
bat"""
pytest -vs Tests/test_change_name.py --platformname Android --udid 33766e229904 --platformversion 7.0
"""
}
}
stage("run check application version test file"){
steps{
bat"""
pytest -vs Tests/test_check_app_version.py --platformname Android --udid 33766e229904 --platformversion 7.0
"""
}
}
stage("run inside manage product test file"){
steps{
bat"""
pytest -vs Tests/test_inner_manage_product.py --platformname Android --udid 33766e229904 --platformversion 7.0
"""
}
}
stage("run data preference test file"){
steps{
bat"""
pytest -vs Tests/test_data_pref.py --platformname Android --udid 33766e229904 --platformversion 7.0
"""
}
}
stage("run manage music test file"){
steps{
bat"""
pytest -vs Tests/test_manage_music.py --platformname Android --udid 33766e229904 --platformversion 7.0
"""
}
}
stage("run test notification test file"){
steps{
bat"""
pytest -vs Tests/test_notification.py --platformname Android --udid 33766e229904 --platformversion 7.0
"""
}
}
}
post {
always {
// copyArtifacts filter: '**/*.log', fingerprintArtifacts: true, projectName: '${JOB_NAME}', selector: specific('${BUILD_NUMBER}')
archiveArtifacts artifacts: 'Screenshot/*', fingerprint: true
cleanWs()
}
}
}