forked from justb4/docker-jmeter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (30 loc) · 1.02 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
TARGET_HOST ?= "www.map5.nl"
TARGET_PORT ?= "80"
THREADS ?= "1"
CONTAINER_NAME ?= "docker-jmeter"
IMAGE = "justb4/jmeter:5.3"
TEST ?= trivial
JVM_ARGS ?= "-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m"
TARGET_PATH ?= "/kaarten.html"
TARGET_KEYWORD ?= "Kaartdiensten"
TEST_DIR = tests/$(TEST)
REPORT_DIR=$(TEST_DIR)/report
all: clean run report
clean:
@rm -rf $(REPORT_DIR) $(TEST_DIR)/test-plan.jtl $(TEST_DIR)/jmeter.log
run:
@mkdir -p $(REPORT_DIR)
docker run --rm --name $(CONTAINER_NAME) -i -v $(PWD):$(PWD) -w $(PWD) $(IMAGE) \
-Dlog_level.jmeter=DEBUG \
-JTARGET_HOST=${TARGET_HOST} -JTARGET_PORT=${TARGET_PORT} \
-JTARGET_PATH=${TARGET_PATH} -JTARGET_KEYWORD=${TARGET_KEYWORD} \
-JTHREADS=$(THREADS) \
-n -t $(TEST_DIR)/test-plan.jmx -l $(TEST_DIR)/test-plan.jtl -j $(TEST_DIR)/jmeter.log \
-e -o $(REPORT_DIR)
report:
echo "==== jmeter.log ===="
cat $(TEST_DIR)/jmeter.log
echo "==== Raw Test Report ===="
cat $(TEST_DIR)/test-plan.jtl
echo "==== HTML Test Report ===="
echo "See HTML test report in $(REPORT_DIR)/index.html"