@xiongtx you can also do this in Kaocha by writing your own plugin
(ns my.plugins
(:require [kaocha.plugin :as p]))
(p/defplugin my.plugins/global-setup
(pre-run [test-plan]
(my-setup)
test-plan)
(post-run [result]
(my-teardown)
result))
command line:
bin/kaocha --plugin my.plugins/global-setup
or kaocha config (`tests.edn`)
#kaocha/v1
{:plugins [:my.plugins/global-setup]}