alphagov / gradle-gatling-plugin Goto Github PK
View Code? Open in Web Editor NEWgradle plugin for running gatling scenarios
License: MIT License
gradle plugin for running gatling scenarios
License: MIT License
Hi, all!
I tried to deal with this Gradle plugin and realized that it has not been updated for a long time (the latest commit was on Feb 16, 2015)
It is necessary to make at least two changes in this plugin:
Number 1.
final String GATLING_VERSION = '2.1.3' should be replaced by final String GATLING_VERSION = '2.2.0-SNAPSHOT'
Number 2.
OK, the above change will allow us to download gatling-charts-highcharts.
But what about the rest of dependencies?
For example, I observed the following errors:
Could not resolve all dependencies for configuration ':testCompile'.
Could not find com.nimbusds:nimbus-jose-jwt:2.22.1.
Could not find org.scala-lang:scala-library:2.11.6
........ and so on and so forth
Solution:
Need to add the line “mavenCentral()” to the list of repositories here:
project.repositories {
mavenCentral()
maven {
url 'http://repository.excilys.com/content/groups/public'
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
}
After that I run ./gradlew from gradle-gatling-plugin directory once again (this by default places an artifact in mavenLocal)
Using the command “gradle gatlingTest” I finally managed to build .JAR file
But too early to celebrate, because gatling scenarios execution failed:
[ant:scalac] Element '/home/user/TEMP/scala/build/classes/main' does not exist.
[ant:scalac] Element '/home/user/TEMP/scala/build/resources/main' does not exist.
Executing gatling scenarios: [UserPermissionScenario]
Exception in thread "main" java.nio.file.NoSuchFileException: target/test-classes
Could you help solve this issue?
The current documentation talks about gatling
as the task to execute all the simulations but the actual task is gatlingTest
.
When adding -D system properties on the gradle command line, the gatling plugin should expose a way to pass those through.
Please publish the latest version to a public maven repo, (on jcenter I currently see v0.3)
This way we could avoid enging up with a jenkins job that builds it locally before launching gatling or putting in place a private maven repo just to publish it
It would be handy having a way to run only a subset of tests available.
Discriminating through .scala file path would be enough, i.e.
gatling {
include 'groupX/**' // runs only scenarios under 'groupX' package
}
I have raised this as an issue, but I am not 100% sure, so please feel free to close it.
It looks like there may be a bug in the JavaExec with regards to request bodies. The documentation found here says the request bodies argument should be -rbf. However in the code it looks like you are using -bf which according to the documentation is the binaries-folder.
I have not needed to use request bodies yet, but this does look like a typo to me.
The instructions provided by the README file led to the following error:
Could not resolve all dependencies for configuration ':classpath'.
Could not find uk.gov:gradle-gatling-plugin:1.1.
Is it mavenLocal() the right repository? There is an old version, 0.3 at bintray.
Hi,
I am trying to run multiple simulations one after the other using gradle with no luck so far. I am presented with a choice in the console with the following build.gradle code. If anyone can help that would be great.
apply plugin: 'scala'
apply plugin: 'idea'
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
compile 'org.scala-lang:scala-library:2.11.7'
testCompile 'io.gatling:gatling-http:2.2.0-M3'
testCompile 'io.gatling:gatling-core:2.2.0-M3'
testCompile 'io.gatling.highcharts:gatling-charts-highcharts:2.2.0-M3'
testCompile 'io.gatling:gatling-app:2.2.0-M3'
testCompile 'junit:junit:4.12'
testCompile 'org.scalatest:scalatest_2.10:3.0.0-M10'
}
sourceSets {
test {
scala {
srcDir 'src/test/scala/com/sky/catfeed'
}
resources {
srcDir 'src/test/resources'
}
compileClasspath += sourceSets.test.compileClasspath
}
}
task loadTest(type: JavaExec) {
dependsOn testClasses
description = "load test with Gatling"
group = "Load Test"
classpath = sourceSets.test.runtimeClasspath
jvmArgs = [
"-Dgatling.core.directory.binaries=${sourceSets.test.output.classesDir.toString()}",
]
main = "io.gatling.app.Gatling"
args = [
"--simulations-folder", sourceSets.test.scala.srcDirs,
"--results-folder", "${buildDir}/gatling-results",
"--binaries-folder", sourceSets.test.output.classesDir.toString(),
"--bodies-folder", sourceSets.test.resources.srcDirs.toList().first().toString() + "/gatling/bodies",
]
}
If you have old report dirs in build/gatling-reports
, an unexpected, stale report may be opened by gradle openGatlingReport
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.