Appwrite Cloud Functions in Dart — Part 2

How to unit test and debug cloud functions in VScode

Alfred Schilken
8 min readOct 28, 2022

Check out part one if you want to know how to set up the project:

In the first part, I wrote about the configuration and test of cloud functions on the web console of Appwrite. I also had examples of scheduling functions and triggering them by events. In this Part 2, I describe my workflow of developing a cloud function, that uses the backend services as input and output of their execution. The function will just write a custom log of all events into a separate database.

In the first section, I show the cumbersome workflow to test a cloud function using the deployed code in the web console. In the second section, I show an alternative way and use my minimalistic integration test frame when developing cloud functions. Maybe there is another way to debug cloud functions in a Docker container or the real backend. I think my workflow is quite easy and it can’t be simpler. But see yourself.

--

--

Alfred Schilken

Software Developer for more than 35 years, started with C and C++, after Java, Python, Groovy, Lua, Golang and Swift now focussing on Dart and Flutter