How can I upload test data to AppEngine automatically?

I would like to automatically upload some test data to the AppEngine datastore when a local copy is launched by one of my developers. I know that the volume loader allows you to do this from the command line, but I'm looking for something automatic. Inevitably, we will forget to load data when we clear test copies of the data warehouse.

Currently, I'm just checking for the presence of a known object when loading the main page and calling a function to insert data when this object is not found. It seems wasteful - it is called every time someone gets on this page.

An ideal solution would be to not affect the deployed version of the app on appspot.com and add dirty code to the central path of the code.

+3
source share
1 answer

Why not just automate the bootloader? This is a command line tool, as you point out, so trivial to run from the build process (or any other trigger you want).

+1
source

Source: https://habr.com/ru/post/1731158/


All Articles