How to test Google Cloud Storage Triggers Cloud Function locally?

2.5k Views Asked by At

With reference to Google Cloud Storage Triggers , I wrote a background function which gets triggered from GCS. Using GCP Function Framework for Java, is it possible to test it locally ?

1

There are 1 best solutions below

0
On

You can test locally your Cloud Function triggers by running integration tests.

Integration tests should trigger and respond to actual Cloud events such as HTTP requests, Pub/Sub messages, or Storage object changes.

Source

Here you may find more information for testing background Cloud Functions.