Re: [google-appengine-go] Continuous integration

73 views
Skip to first unread message

Kyle Lemons

unread,
Jan 9, 2013, 7:38:09 PM1/9/13
to Dominic Hamon, google-appengine-go
You can use the dev_appserver to compile your code, and you can do some testing locally with it as well.


On Wed, Jan 9, 2013 at 3:25 PM, Dominic Hamon <dom...@measurementlab.net> wrote:
For my Python GAE instances, I can run a continuous integration that runs unit tests. I'd like to do the same for a go GAE instance, and preferably compile everything.

As far as I can tell, it isn't possible to compile a go appengine codebase using 'go build'. What's the best practice for this?

Separate the GAE from the non-GAE and compile the non-GAE, leaving the GAE bits uncompiled/untested?  

Thanks

Dominic Hamon

unread,
Jan 9, 2013, 7:52:08 PM1/9/13
to Kyle Lemons, google-appengine-go
But in a continuous integration environment, I don't necessarily want to be running the server.

Though I suppose, if I do, it will still only run as localhost... Hmm, that may be the right thing to do, actually. Thanks.

Kyle Lemons

unread,
Jan 22, 2013, 6:10:16 PM1/22/13
to Ryan W Sims, google-appengine-go, Dominic Hamon
In your test (which is probably a bash wrapper script), spin up the dev_appserver, run your test queries, then kill the dev_appserver.


On Mon, Jan 21, 2013 at 5:03 PM, <rws...@gmail.com> wrote:
On Wednesday, January 9, 2013 7:38:09 PM UTC-5, Kyle Lemons wrote:
You can use the dev_appserver to compile your code, and you can do some testing locally with it as well.

You mean it can automatically run unit tests, or something similar? Could you expand on this, or point to docs?

Kyle Lemons

unread,
Jan 23, 2013, 4:16:10 AM1/23/13
to Ryan W Sims, google-appengine-go, Dominic Hamon
On Tue, Jan 22, 2013 at 7:01 PM, <rws...@gmail.com> wrote:
On Tuesday, January 22, 2013 6:10:16 PM UTC-5, Kyle Lemons wrote:
In your test (which is probably a bash wrapper script), spin up the dev_appserver, run your test queries, then kill the dev_appserver.

Maybe I'm being dense, but I'm afraid I still don't follow. How are your tests creating a Context to run the queries? Do you use wget or something to send actual HTTP requests & then compare against a golden output?

You have a number of options.  You could register admin-only handlers that run "unit tests" which call your handlers with crafted ResponseWriters and Requests, and then a simple curl/wget with a grep can check its results.  You could make a black box tester that crafts HTTP requests and sends them.  The procurement of a Context is not relevant, as that's done inside the code that's being tested, and so it's provided by the appengine libraries appropriate for either dev_appserver or production. 
Reply all
Reply to author
Forward
0 new messages