英文:
How to run golang tests after automatic compile from dev_appserver
问题
我正在运行dev_appserver.py,所以它会在我保存go文件时自动构建(由于我需要的log_level,我需要运行这个而不是goapp)。
当构建成功时,我希望项目的测试(goapp test)能够自动运行。我该如何做到这一点?
英文:
I am running dev_appserver.py and so it auto builds as I save go files (I need to run this and not goapp because of log_level I need).
When there is a successful build I would like the tests for the project (goapp test) to run automatically. How can I do this?
答案1
得分: 2
你可以在一个单独的终端窗口中使用类似<https://github.com/nf/watch>的工具。它将与dev_appserver.py
并行重新运行测试。
安装:go get github.com/nf/watch
从你的应用目录中运行:watch goapp test
英文:
You could use something like <https://github.com/nf/watch> in a separate terminal window. It'll re-run tests in parallel to dev_appserver.py
.
Install: go get github.com/nf/watch
Run from your app's directory: watch goapp test
答案2
得分: 0
使用AppEngine时,我像这样使用entr
应用程序:
$ find ./*.go | entr goapp test
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论