9

I'm trying to write an app for App Engine using the Go SDK, but it seems to have a funny relationship to unit testing. People have written libraries around this original, outdated set of tools, but every time I try to install them, depending on the Go command I use I run into one of two problems:

  • From the standard go: Can't locate 'appengine' or 'appengine_internal'
  • From the SDK's go: not allowed to build packages. I doubt I'm supposed to be using this.

My guess is that I have to manipulate my $GOPATH to include a directory somewhere in the SDK so that the appengine packages are visible, but I've tried many variations (such as $SDK/goroot, $SDK/goroot/src, etc.) and none of them seem to work.

-Generally-, what testing strategies might one suggest for App Engine for Go?

-Specifically-, how can I go about making those packages visible so that I may use the general Go tool to install libraries that depend on them (such as these testing packages) or otherwise run my own test suites?

1 Answer 1

2

This answer provides detailed installation instructions for the updated gae-go-testing. I did a quick run through and they do seem to work. Note that installation involves copying across appengine, appengine_internal and goprotobuf from the SDK to your local go install.

1
  • Hmm... didn't seem to work for me, but after enough tutorials failed attempts, I think something's just wrong with my environment (this time it failed because it was looking for some functions in package os that are present in the App Engine distro but not the vanilla Go distro). I have a setup available for testing, but it's hack-ey and makes the app development too Design Pattern-ey, so not loving it. But it'll do. In any case, will mark as answered, thanks for your help ^_^ Feb 28, 2013 at 23:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.