Revert "Add Jenkinsfile & update gatling version"
This reverts commit a2314c69d9
.
This commit is contained in:
parent
58e3ab4deb
commit
ef1c761607
|
@ -1,20 +0,0 @@
|
|||
pipeline {
|
||||
agent any
|
||||
stages {
|
||||
stage("Build Maven") {
|
||||
steps {
|
||||
sh 'mvn -B clean package'
|
||||
}
|
||||
}
|
||||
stage("Run Gatling") {
|
||||
steps {
|
||||
sh 'mvn gatling:test'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
gatlingArchive()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -15,7 +15,6 @@
|
|||
<relativePath>../../</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
@ -95,26 +94,43 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>simulation</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.gatling</groupId>
|
||||
<artifactId>gatling-maven-plugin</artifactId>
|
||||
<version>${gatling-maven-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>test</phase>
|
||||
<goals>
|
||||
<goal>execute</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<simulationClass>org.baeldung.RecordedSimulation</simulationClass>
|
||||
<disableCompiler>true</disableCompiler>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<encoding>UTF-8</encoding>
|
||||
<scala.version>2.12.6</scala.version> <!--2.11.12 --> <!--2.12.6 -->
|
||||
<gatling.version>3.3.1</gatling.version> <!--2.2.5 --> <!--2.3.1 -->
|
||||
<scala-maven-plugin.version>4.3.0</scala-maven-plugin.version> <!--3.2.2 --> <!--3.3.2 -->
|
||||
<gatling-maven-plugin.version>3.0.4</gatling-maven-plugin.version> <!--2.2.1 --> <!--2.2.4 -->
|
||||
<gatling.version>2.3.1</gatling.version> <!--2.2.5 --> <!--2.3.1 -->
|
||||
<scala-maven-plugin.version>3.2.2</scala-maven-plugin.version> <!--3.2.2 --> <!--3.3.2 -->
|
||||
<gatling-maven-plugin.version>2.2.4</gatling-maven-plugin.version> <!--2.2.1 --> <!--2.2.4 -->
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -3,10 +3,11 @@ import io.gatling.core.config.GatlingPropertiesBuilder
|
|||
|
||||
object Engine extends App {
|
||||
|
||||
val props = new GatlingPropertiesBuilder()
|
||||
.resourcesDirectory(IDEPathHelper.resourcesDirectory.toString)
|
||||
.resultsDirectory(IDEPathHelper.resultsDirectory.toString)
|
||||
.binariesDirectory(IDEPathHelper.mavenBinariesDirectory.toString)
|
||||
val props = new GatlingPropertiesBuilder
|
||||
props.dataDirectory(IDEPathHelper.dataDirectory.toString)
|
||||
props.resultsDirectory(IDEPathHelper.resultsDirectory.toString)
|
||||
props.bodiesDirectory(IDEPathHelper.bodiesDirectory.toString)
|
||||
props.binariesDirectory(IDEPathHelper.mavenBinariesDirectory.toString)
|
||||
|
||||
Gatling.fromMap(props.build)
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import io.gatling.commons.util.PathHelper._
|
|||
|
||||
object IDEPathHelper {
|
||||
|
||||
val gatlingConfUrl: Path = getClass.getClassLoader.getResource("gatling.conf")
|
||||
val gatlingConfUrl: Path = getClass.getClassLoader.getResource("gatling.conf").toURI
|
||||
val projectRootDir = gatlingConfUrl.ancestor(3)
|
||||
|
||||
val mavenSourcesDirectory = projectRootDir / "src" / "test" / "scala"
|
||||
|
@ -12,8 +12,11 @@ object IDEPathHelper {
|
|||
val mavenTargetDirectory = projectRootDir / "target"
|
||||
val mavenBinariesDirectory = mavenTargetDirectory / "test-classes"
|
||||
|
||||
val resourcesDirectory = mavenResourcesDirectory
|
||||
val recorderSimulationsDirectory = mavenSourcesDirectory
|
||||
val dataDirectory = mavenResourcesDirectory / "data"
|
||||
val bodiesDirectory = mavenResourcesDirectory / "bodies"
|
||||
|
||||
val recorderOutputDirectory = mavenSourcesDirectory
|
||||
val resultsDirectory = mavenTargetDirectory / "gatling"
|
||||
|
||||
val recorderConfigFile = mavenResourcesDirectory / "recorder.conf"
|
||||
}
|
||||
|
|
|
@ -3,10 +3,10 @@ import io.gatling.recorder.config.RecorderPropertiesBuilder
|
|||
|
||||
object Recorder extends App {
|
||||
|
||||
val props = new RecorderPropertiesBuilder()
|
||||
.simulationsFolder(IDEPathHelper.recorderSimulationsDirectory.toString)
|
||||
.simulationPackage("org.baeldung")
|
||||
.resourcesFolder(IDEPathHelper.resourcesDirectory.toString)
|
||||
val props = new RecorderPropertiesBuilder
|
||||
props.simulationOutputFolder(IDEPathHelper.recorderOutputDirectory.toString)
|
||||
props.simulationPackage("org.baeldung")
|
||||
props.bodiesFolder(IDEPathHelper.bodiesDirectory.toString)
|
||||
|
||||
GatlingRecorder.fromMap(props.build, Some(IDEPathHelper.recorderConfigFile))
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import io.gatling.jdbc.Predef._
|
|||
class RecordedSimulation extends Simulation {
|
||||
|
||||
val httpProtocol = http
|
||||
.baseUrl("http://computer-database.gatling.io")
|
||||
.baseURL("http://computer-database.gatling.io")
|
||||
.inferHtmlResources(BlackList(""".*\.css""", """.*\.js""", """.*\.ico"""), WhiteList())
|
||||
.acceptHeader("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
|
||||
.acceptEncodingHeader("gzip, deflate")
|
||||
|
|
Loading…
Reference in New Issue