go和appengine的测试用例 [英] Test cases for go and appengine
问题描述
我试过使用gos标准测试包,
Files(两个包hello):
hello / http.go
hello / http_test.go
问题:我无法执行 go test hello
。我得到的最接近的是 go test hello / http_test.go
如果我不对 http.go $ c $进行任何调用c>,这是毫无意义的。 :)
一个有趣的开发:从1.8.6开始,使用服务存根进行测试已经通过appengine / aetest
包。这很大程度上像上面通过测试上下文一样工作。 更多信息
I am using Go and appengine, and now I would like to do some test cases.
I tried using gos standard test package, Files (both "package hello"):
hello/http.go
hello/http_test.go
Problem: I cannot run go test hello
. The closest I have got is go test hello/http_test.go
which works if I do not make any calls to http.go
, which is quite pointless. :)
An interesting development: as of 1.8.6 using service stubs for testing has been integrated into the SDK through the "appengine/aetest"
package. This works largely like the above via a "testing" context. More info
这篇关于go和appengine的测试用例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!