Testing the Function
- In the Cloud Functions Overview page, beside the last deployed column, you may find 3 dots which display menu for your function. In that, click Test function.
- Now, a Function details page will open. In the Triggering event box, add
{"message":"Hello World!"}
- . In this testing form, we provide a JSON formatted message. Next, click Test the function. This invokes our function and the output of out function will be shown to us in the output box, and you can see that your function is executed.
Output:
Hello World!
- Below the Output box, in the Logs field, you might see finished with status code:200. A status code of 200 indicates that your function was successfully executed.