unit-testing - 如何为在 Go 中使用 App Engine 服务的代码运行单元测试?

标签 unit-testing google-app-engine go

有人告诉我,为使用 App Engine 服务(例如数据存储或内存缓存)的代码运行单元测试的最佳解决方案是在子进程中运行开发服务器,但我不确定如何操作。有人成功运行过这种测试并可以分享解决方案吗?

适用于 Go 的 App Engine SDK 使用 Python dev_appserver; see this thread .

最佳答案

您应该查看 Google App Engine Go testing library作者:乔什·马什。

关于unit-testing - 如何为在 Go 中使用 App Engine 服务的代码运行单元测试?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7858711/

相关文章:

go - 如何在特定部分创建一个具有接口(interface)名称的文件,然后从另一个文件中解析以修改 GO 中数据的接口(interface)?

C# - EF 6 - MySQL : Error when calling method from unit test method

javascript - 使用 Resharper 测试运行程序时如何在我的 qunit 测试中设置断点

google-app-engine - 无需 Eclipse 即可部署到应用程序引擎?

Golang jsonapi 需要 string 或 int 但 mongo 需要 bson.ObjectId

mongodb - 监视 MongoDB 更改流

c# - 使用 NInject Mocking Kernel 模拟返回接口(interface)的方法

unit-testing - BDD 场景什么时候会变得过于具体?

python - 调试网络应用程序

google-app-engine - 如何在 App Engine Flexible 中更改/dev/shm 的大小