Test-Deployments Not Working for Editor Add-Ons

375 views
Skip to first unread message

Trace Bowen

unread,
Jul 26, 2024, 6:00:19 PM7/26/24
to Google Apps Script Community
Hello community,

I am having a lot of trouble figuring out how to use the test deployments feature for apps script projects. Recently I have been developing an add-on via a script that was bound to a spreadsheet (bound script). I now want to share and test the add-on, which means I should create a standalone apps script project and include my code as a part of that project.

I have done exactly that, but found that the test deployments for editor add-ons are not working. I have set up test deployments to deploy to a certain spreadsheet, and configured the permissions of the deployment to be both installed and enabled. Additionally in my code, it uses the onInstall(e) method as well as a call to the onOpen(e) function as referenced in documentation. The onOpen routine creates a menu from which to access my UI, and it works perfectly in the bound script but will never show up in these test deployments.

I am not sure what I am doing wrong. Nothing I have tried has allowed for a test deployment of the bound script to successfully populate the menu and I am stuck / need some help. I have done a ton of research and I am not sure what the issue is with the test deployments not showing anything in my custom menu. I believe this might be related to issue 250812440 on google's issue tracker? But I'm not sure. Has anyone else experienced this or found a solution? Thanks.

Ed Robinson

unread,
Jul 27, 2024, 11:30:17 AM7/27/24
to Google Apps Script Community
Hi Trace,
I have test deployments working (for both sheets and docs add-ons). It works OK, but there are a few steps + limitations

Here is what I found:
- You can't deploy the test version as an unbound add-on, each test is bound to a specific document
- If you're deploying to two testers, you can choose a different test-doc for each tester, but they will only see the add-on on the test-doc (not on their regular documents).
- In the Google OAuth config, you'll also need to add the email addresses for each tester as an authorized user (I can't recall if this also applies for people inside your domain)

Steps I took to get it working
- The tester shared a test-doc with me
- I created a test that bound the add-on to the shared test-doc
- Added them as an authorized tester in the cloud dashboard
- Viola! 

Hope this helps,
Ed
Reply all
Reply to author
Forward
0 new messages