Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Pravoru/gatling-junitrunner
JUnit wrapper around gatling simulations
https://github.com/Pravoru/gatling-junitrunner
debugging gatling junit
Last synced: about 1 month ago
JSON representation
JUnit wrapper around gatling simulations
- Host: GitHub
- URL: https://github.com/Pravoru/gatling-junitrunner
- Owner: Pravoru
- License: mit
- Created: 2017-07-26T10:43:01.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-09T08:34:53.000Z (about 6 years ago)
- Last Synced: 2024-01-25T05:40:55.237Z (11 months ago)
- Topics: debugging, gatling, junit
- Language: Scala
- Size: 18.6 KB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
- License: License.md
Awesome Lists containing this project
- awesome-gatling - gatling-junitrunner - JUnit wrapper around Gatling simulations. (Tools / Plugins)
README
# JUnit wrapper around Gatling simulations
## Goal
Gatling do not has an ability to be run as normal unit test. Gatling team has its reasons for this, however we need to debug simulation before running it under heavy load.
## Instalation
We mimic gatling versioning. For our purposes we use fourth digit in version number.
`build.sbt`
```scala
libraryDependencies += "ru.pravo" %% "gatling-junitrunner" % "3.0.0.0"
```## Using
Just add `@RunWith(classOf[JUnitRunner])` annotation to your simulation classes.
```scala
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import org.junit.runner.RunWith
import ru.pravo.qa.gatling.junit.JUnitRunner@RunWith(classOf[JUnitRunner])
class ExampleSimulation extends Simulation {
val httpConf = http
.baseUrl("http://google.com")val scn = scenario("Positive Scenario")
.exec(
http("request_1").get("/")
)setUp(scn.inject(atOnceUsers(1)).protocols(httpConf))
}
```