【发布时间】:2016-06-04 15:40:53
【问题描述】:
在我的 Google App Engine Go 项目中,当我运行 goapp test 时,出现以下错误:
runtime.main_main: main.main: not defined
runtime.main_main: undefined: main.main
由于它不是一个普通的 Go 应用,而是一个 Google App Engine 应用,它没有 main.main(),所以我需要做什么才能运行测试?
【问题讨论】:
-
运行
goapp test时工作目录下有*_test.go文件吗? -
测试文件位于子文件夹中,但是当我在工作目录中放置一个虚拟测试时,它可以正常运行虚拟测试。将您的评论放在答案中,我会将其标记为正确。
标签: unit-testing google-app-engine go