-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to test gcloud applications #1822
Comments
Hey @txomon! |
The documentation I am looking now is for Datastore and Pubsub, but these are the services we are already using:
If ongoing reported issues are resolved, we will be migrating also to:
Storage and bigquery are still waiting for approval and to have a proper environment, but the others are already in use. |
|
@txomon if you were developing using another cloud provider's services, how would you do system testing? I ask this question because the emulators are currently pretty limited, so the best recommendation for testing is to either do integration testing (with mocks) or do system testing against a separate project. |
We basically run with rabbitmq instead of pubsub, dynamodb has an emulator as datastore does, and the rest of the databases are opensource (Postgres/Mysql). Redis and memcached are both opensource, so no problems there, and for metadata we used environment variables. I agree however that Google Cloud Store may not make much sense, but for BigQuery it does definitely make sense to have something (a provided mock or something). |
Hi all, I wanted to second @txomon's request/suggestion. I am looking for a compute backend mock and was disappointed to find that no support is provided. I was unaware of To answer your question @jonparrott, AWS cloud services have relatively comprehensive mock coverage provided by https://github.com/spulec/moto. google.appengine.ext.testbed seems to be the closest thing provided by Google to this, but is again lacking in service coverage. |
Thanks for the feedback.
This is mocking the library, whereas we prefer to provide an emulator that will work across languages. Once this library reaches 1.0 it might be worthwhile to look into providing some sort of mocking for the library, but I'm unsure how useful that'll be in light of the emulators.
We are as well, but that applies to unit tests which explicitly don't need to hit the live services. Our system tests do indeed hit both lives services and the emulators (if available). |
In my case the idea of having a mocking library is that I can run unittests
in parallel, however I really prefer to have perfect emulators than mocking
libraries indeed.
…On Wed, 30 Nov 2016 18:09 Jon Wayne Parrott, ***@***.***> wrote:
Thanks for the feedback.
To answer your question @jonparrott <https://github.com/jonparrott>, AWS
cloud services have relatively comprehensive mock coverage provided by
https://github.com/spulec/moto.
This is mocking the library, whereas we prefer to provide an emulator that
will work across languages. Once this library reaches 1.0 it might be
worthwhile to look into providing some sort of mocking for the library, but
I'm unsure how useful that'll be in light of the emulators.
I am wary of requiring a separate process for testing (see #2
<#2>
(comment)).
We are as well, but that applies to *unit tests* which explicitly don't
need to hit the live services. Our *system tests* do indeed hit both
lives services and the emulators (if available).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1822 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAN7mottwruRLtrJrAf2kv-c6RFdLxb1ks5rDbvlgaJpZM4InkV5>
.
|
@txomon We do have support in the library for Datastore, Pub / Sub and Bigtable emulators. You can run our system tests against the emulators via:
|
Hello,
I have seen there are some efforts to create a local environment for testing, such as the datastore emulator, and the pubsub emulator, but I haven't seen more or documentation on how to use them.
One of the main blocks for the development with gcloud AFAI see is that there is not an standard to setup a integration testing environment. Certainly the ability to transparently connect and authenticate to upstream services is nice, but in order to develop, in the teams I work in, we really need to have a local testing environment.
The library is easy to mock, but I would highly appreciate having an standard way for developers have their testing environment, and documentation on how to do it.
I understand this effort is under
gcloud beta emulators
, but I have failed to find a way to integrate them with this library.The text was updated successfully, but these errors were encountered: