Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ghoshasish99/gatling-performance-test
Gatling Test
https://github.com/ghoshasish99/gatling-performance-test
gatling performance-testing scala
Last synced: about 1 month ago
JSON representation
Gatling Test
- Host: GitHub
- URL: https://github.com/ghoshasish99/gatling-performance-test
- Owner: ghoshasish99
- Created: 2021-02-02T00:46:25.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-11T20:14:15.000Z (about 4 years ago)
- Last Synced: 2024-11-15T06:42:35.204Z (3 months ago)
- Topics: gatling, performance-testing, scala
- Language: Scala
- Homepage: https://ghoshasish99.github.io/Gatling-Performance-Test/
- Size: 10.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gatling Test

Gatling HighCharts Dependency
```
io.gatling.highcharts
gatling-charts-highcharts
3.1.0
```Scala-library Dependency
```org.scala-lang
scala-library
2.12.0```
To execute the test, use `mvn gatling:test`
To set the `http` config :
```scala
val httpConf = http.baseUrl("https://reqres.in/")
.header("Accept", "application/json")
```
To create a request :
```scala
.exec(http("Create User")
.post("api/users")
.formParam("name", "Ashish")
.formParam("job", "Test Engineer")
```
To check response code :
```scala
.check(status.is(201))
```
To check a Json tag :
```scala
.check(jsonPath("$.name").is("Ashish"))
```
To test your JsonPath you can use [this.](https://jsonpath.com/)To store a Json tag as a session variable :
```scala
.check(jsonPath("$.id").saveAs("id"))
```
Example of how to set up load :
```scala
setUp(
scn.inject(
nothingFor(5),
atOnceUsers(10),
rampUsers(10) during (20)
).protocols(httpConf)
).maxDuration(60)
````
To read more about Gatling, please refer to [this website.](https://gatling.io/)