-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile_test
46 lines (36 loc) · 1.49 KB
/
Makefile_test
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
36
37
38
39
40
41
42
43
44
45
46
COMPONENT_TESTS_DIR = ./sampleService/tests/component
UNIT_TESTS_DIR = ./sampleService/tests/unit
ALL_TESTS_DIR = ./sampleService/tests
LOAD_TESTS_DIR = ./sampleService/tests/load
export PYTHONPATH := $(shell pwd)/sampleService
export HOST := 0.0.0.0
export PORT := 8000
.PHONY: sample_component_tests
sample_component_tests:
pytest --alluredir allure-results $(COMPONENT_TESTS_DIR)
.PHONY: sample_unit_tests
sample_unit_tests:
pytest --alluredir allure-results $(UNIT_TESTS_DIR)
.PHONY: sample_all_tests
sample_all_tests:
pytest --alluredir allure-results $(ALL_TESTS_DIR)
.PHONY: run_load_test_post_user
run_load_test_post_user:
K6_WEB_DASHBOARD_EXPORT=report.html K6_WEB_DASHBOARD=true K6_WEB_DASHBOARD_OPEN=true k6 run --vus ${USERS_COUNT} --duration ${DURATION} $(LOAD_TESTS_DIR)/post-users.js
.PHONY: run_load_test_get_one_user
run_load_test_get_one_user:
K6_WEB_DASHBOARD_EXPORT=report.html K6_WEB_DASHBOARD=true K6_WEB_DASHBOARD_OPEN=true k6 run --vus ${USERS_COUNT} --duration ${DURATION} $(LOAD_TESTS_DIR)/get-one-user.js
.PHONY: sample_run_dev
sample_run_dev:
docker-compose -f ./sampleService/docker-compose.testing.yml --env-file=./sampleService/.env.testing up -d --build
python ./sampleService/src/create_sample_db.py
.PHONY: sample_stop_dev
sample_stop_dev:
docker-compose -f ./sampleService/docker-compose.testing.yml --env-file=./sampleService/.env.testing down
.PHONY: sample_print_vars
sample_print_vars:
echo $(PYTHONPATH)
echo $(POSTGRESQL_PASSWORD)
.PHONY: test
test:
echo "${BAR}"