Skip to content

Commit 83356fb

Browse files
committed
added JenkinFile
1 parent 4865489 commit 83356fb

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Jenkinsfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
pipeline {
2+
agent any
3+
parameters {
4+
string(name: 'baseUrl', defaultValue: 'https://rahulshettyacademy.com', description: 'Base URL for API tests')
5+
}
6+
stages {
7+
stage('Checkout') {
8+
steps {
9+
git url: 'https://github.com/spy235/RestAssured-Framework', branch: 'main'
10+
}
11+
}
12+
stage('Run Tests') {
13+
steps {
14+
sh "mvn clean test -DbaseUrl=${params.baseUrl}"
15+
}
16+
}
17+
stage('Publish Report') {
18+
steps {
19+
publishHTML([reportDir: 'target', reportFiles: 'ExtentReport.html', reportName: 'API Test Report'])
20+
}
21+
}
22+
}
23+
}

0 commit comments

Comments
 (0)