Testing unpublished add-on

Installable triggers and unpublished add-ons

As described in Setting up onChange trigger and When test add-ons doesn’t work you can’t install a trigger in test mode. The solution is to use your add-on as a library to a container bound script till you’re finished testing, then remove those links when ready to publish.


Like this

Setting up container bound script for testing

Once you’ve created a sheet and a script to go with it, you’ll need this code in it.



		


Here the add-on is called SheetEfxDemo and it is included it as a library to the container bound script. The exposeRun function enables  calling namespaces from google.script.run and the other stuff is adding a menu item to call the add-on, so it now looks like this

For more like this, see Google Apps Scripts snippets

Find out more about Pushing Changes from Google Sheets server to client here