SHELL := /bin/bash
ENV ?= dev
HURL_OPTS := --variables-file env/$(ENV).env --file-root . --test

.PHONY: test test-flows test-modules test-negative report clean

test:            ## 运行所有测试
	hurl $(HURL_OPTS) .

test-flows:      ## 运行业务流程测试
	hurl $(HURL_OPTS) flows/

test-modules:    ## 运行模块接口测试
	hurl $(HURL_OPTS) modules/

test-negative:   ## 运行异常测试
	hurl $(HURL_OPTS) negative/

report:          ## 生成 HTML 报告
	mkdir -p build/report
	hurl $(HURL_OPTS) --report-html build/report/ .

clean:           ## 清理报告
	rm -rf build/report
