Skip to content

Commit d40f4b6

Browse files
get and post examples
1 parent d8fd600 commit d40f4b6

File tree

22 files changed

+3470
-58
lines changed

22 files changed

+3470
-58
lines changed

.github/workflows/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
fetch-depth: '1'
1313
- name: Install Deps
1414
run: |
15-
brew install pre-commit
15+
brew install pre-commit shellcheck
1616
- name: Check All Files
1717
run: |
1818
pre-commit run --all-files

CHANGELOG.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,30 @@
44

55

66
<a name="v0.1.0"></a>
7-
## v0.1.0 - 2020-05-24
7+
## [v0.1.0] - 2020-05-24
8+
9+
- get and post examples
10+
11+
12+
<a name="v0.0.3"></a>
13+
## [v0.0.3] - 2020-05-24
14+
15+
- not provided simulation
16+
17+
18+
<a name="v0.0.2"></a>
19+
## [v0.0.2] - 2020-05-24
20+
21+
- config and feeders
22+
23+
24+
<a name="v0.0.1"></a>
25+
## v0.0.1 - 2020-05-24
826

9-
- initial version
1027
- Initial commit
1128

1229

13-
[Unreleased]: https://github.com/ik-performance/performance-blueprint-project.git/compare/v0.1.0...HEAD
30+
[Unreleased]: https://github.com/ik-performance/gatling-blueprint.git/compare/v0.1.0...HEAD
31+
[v0.1.0]: https://github.com/ik-performance/gatling-blueprint.git/compare/v0.0.3...v0.1.0
32+
[v0.0.3]: https://github.com/ik-performance/gatling-blueprint.git/compare/v0.0.2...v0.0.3
33+
[v0.0.2]: https://github.com/ik-performance/gatling-blueprint.git/compare/v0.0.1...v0.0.2

Makefile

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1-
.PHONY: pre-commit changelog release
1+
.PHONY: pre-commit changelog docker
22

33
SHELL = /bin/bash -o pipefail
4-
DOCKER_IMAGE ?= cloudkats/gatling:3.3.1
54
PROJECT_PATH ?= $(shell 'pwd')
5+
CURRENT_TIME ?= $(shell date +%Y-%m-%d--%H-%M)
6+
7+
DOCKER_IMAGE ?= cloudkats/gatling:3.3.1
8+
SIMULATION ?= initial
9+
10+
green = $(shell echo -e '\x1b[32;01m$1\x1b[0m')
11+
yellow = $(shell echo -e '\x1b[33;01m$1\x1b[0m')
12+
red = $(shell echo -e '\x1b[33;31m$1\x1b[0m')
613

714
help:
8-
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
15+
@grep -E '^[/\a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
916

1017
init: ## Commit hooks setup
1118
@pre-commit install
@@ -18,11 +25,34 @@ validate: ## Validate with pre-commit hooks
1825
change: ## Update changelog
1926
git-chglog -o CHANGELOG.md --next-tag `semtag final -s minor -o`
2027

21-
simulation: ## Gatling run scenario
28+
docker/inspect: ## Inspect container
29+
@docker run --rm -it \
30+
-v ${PROJECT_PATH}/conf:/opt/gatling/conf \
31+
-v ${PROJECT_PATH}/src/gatling:/opt/gatling/user-files \
32+
-v ${PROJECT_PATH}/results:/opt/gatling/results \
33+
$(DOCKER_IMAGE) /bin/bash
34+
35+
reports: ## Awailable Reports
36+
@ls -ld results/* | cut -d ' ' -f12
37+
38+
clean/results: ## Clean results folder
39+
@rm -rf $$(ls -ld results/* | cut -d ' ' -f12)
40+
41+
run/simulation: ## Gatling run scenario 'make simulation=initial'
42+
@docker run --rm -it \
43+
-v ${PROJECT_PATH}/conf:/opt/gatling/conf \
44+
-v ${PROJECT_PATH}/src/gatling:/opt/gatling/user-files \
45+
-v ${PROJECT_PATH}/results:/opt/gatling/results \
46+
$(DOCKER_IMAGE) \
47+
bin/gatling.sh \
48+
--simulation $(SIMULATION) \
49+
--results-folder /opt/gatling/results/$(SIMULATION)-$(CURRENT_TIME)
50+
51+
choose/simulation: ## Show all simulations
2252
@docker run --rm -it \
2353
-v ${PROJECT_PATH}/conf:/opt/gatling/conf \
2454
-v ${PROJECT_PATH}/src/gatling:/opt/gatling/user-files \
2555
-v ${PROJECT_PATH}/results:/opt/gatling/results \
2656
$(DOCKER_IMAGE) \
2757
bin/gatling.sh \
28-
--simulation SimpleSimulation
58+
--results-folder /opt/gatling/results/$(CURRENT_TIME)

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
Starter/Blueprint project for writing performance tests with Gatling, using Gradle as buildtool.
44

5-
[Documentation](https://gatling.io/docs/current/)
5+
- [Documentation](https://gatling.io/docs/current/)
6+
- [Cheet Sheet](https://gatling.io/docs/current/cheat-sheet/)
7+
- [Reports](https://gatling.io/docs/current/general/reports/)
68

79
[![](https://img.shields.io/github/license/ik-performance/gatling-blueprint)](https://github.com/ik-performance/gatling-blueprint)
810
![](https://img.shields.io/github/v/tag/ik-performance/gatling-blueprint)
@@ -21,6 +23,9 @@ Starter/Blueprint project for writing performance tests with Gatling, using Grad
2123
+ [Gatling DSL](#gatling-dsl)
2224
+ [Scenario's](#scenario-s)
2325
+ [Simulations](#simulations)
26+
* [Mocking](#mocking)
27+
+ [Data](#data)
28+
+ [API](#api)
2429
* [Alternative Examples](#alternative-examples)
2530
* [Targets](#targets)
2631
* [:memo: Guidelines](#-memo--guidelines)
@@ -41,6 +46,18 @@ A scenario contains at least one request. Typically, this is a HTTP request.
4146
### Simulations
4247
A simulation can be seen as the actual test. It determines what scenario's should be run, and how many users should be simulated over the scenario's.
4348

49+
## Mocking
50+
51+
### Data
52+
53+
- https://mockaroo.com/
54+
55+
### API
56+
57+
- https://mockaroo.com/
58+
- https://jsonplaceholder.typicode.com
59+
- https://test-api.k6.io/
60+
4461
## Alternative Examples
4562

4663
- https://qautomation.blog/category/gatling/
@@ -85,4 +102,4 @@ Submit a pull request
85102

86103
Currently maintained by [Ivan Katliarchuk](https://github.com/ivankatliarchuk) and these [awesome contributors](https://github.com/terraform-module/terraform-module-blueprint/graphs/contributors).
87104

88-
[![ForTheBadge uses-git](http://ForTheBadge.com/images/badges/uses-git.svg)](https://GitHub.com/)
105+
[![ForTheBadge uses-git](http://ForTheBadge.com/images/badges/uses-git.svg)](https://GitHub.com/)

conf/gatling.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ gatling {
3939
simulations = user-files/simulations # Folder where the bundle's simulations are located
4040
#reportsOnly = "" # If set, name of report folder to look for in order to generate its report
4141
#binaries = "" # If set, compiles classes are located: Defaults to GATLING_HOME/target.
42-
results = results # Name of the folder where all reports folder are located
42+
# results = results # Name of the folder where all reports folder are located
4343
}
4444
}
4545
// socket {

src/actions/Address.scala

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/gatling/bodies/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)