Google Workspace-Add-ons mit Apps Script testen und debuggen
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Wenn Sie ein Add-on veröffentlichen, können Nutzer es über die Hostanwendung oder den Google Workspace Marketplace installieren. Testen Sie vor der Veröffentlichung die von Ihnen entwickelten Add-ons in den Hostanwendungen, die sie erweitern.
Auf dieser Seite wird beschrieben, wie Sie ein Add-on, das sich noch in der Entwicklungsphase befindet (nicht veröffentlichtes oder Entwickler-Add-on), zum Testen oder für den persönlichen Gebrauch installieren. Sie können Add-ons auch mit dem Debugger und den Haltepunkten der Apps Script IDE debuggen.
Vorbereitung
Sie benötigen Bearbeitungszugriff auf das Script-Projekt des Add-ons.
Wenn Sie anderen Personen in Ihrer Organisation erlauben möchten, das Add-on zu testen, gewähren Sie ihnen Bearbeitungszugriff auf das Script-Projekt. Weitere Informationen zum Gewähren von Zugriff finden Sie unter Mit anderen Entwicklern zusammenarbeiten.
Nicht veröffentlichtes Add-on installieren
Sie können unveröffentlichte Add-ons über das Dialogfeld Bereitstellungen in Apps Script installieren.
So installieren Sie ein nicht veröffentlichtes Google Workspace-Add-on zum Testen:
Öffnen Sie das Script-Projekt im Apps Script-Editor.
Klicken Sie auf Bereitstellen > Bereitstellungen testen.
Klicken Sie auf Installieren.
Klicken Sie unten auf Fertig.
Sie können andere Nutzer das Add-on testen lassen, indem Sie das Apps Script-Projekt für ihr Konto freigeben. Dazu ist Bearbeitungszugriff erforderlich. Bitten Sie die Nutzer dann, die oben genannten Schritte auszuführen.
Nach der Installation ist das Add-on sofort in den Hostanwendungen verfügbar, die es erweitert. Möglicherweise müssen Sie den Tab „Hostanwendung“ aktualisieren, bevor das Add-on angezeigt wird. Außerdem müssen Sie das Add-on autorisieren, bevor Sie es verwenden können.
Nicht veröffentlichtes Add-on deinstallieren
So deinstallieren Sie eine nicht veröffentlichte Add-on-Bereitstellung:
Öffnen Sie das Script-Projekt im Apps Script-Editor.
Klicken Sie auf Bereitstellen > Bereitstellungen testen.
Klicken Sie auf Deinstallieren.
Klicken Sie unten auf Fertig.
Dadurch wird die Bereitstellung sofort entfernt und das Add-on wird in keiner Hostanwendung mehr angezeigt. Sie können die Bereitstellung jederzeit neu installieren, indem Sie den Installationsvorgang wiederholen.
Best Practices für Tests
Beachten Sie beim Testen Ihres Google Workspace-Add-ons die Best Practices für die Add-on-Entwicklung. Beachten Sie außerdem Folgendes:
Testen Sie die Navigation auf Karten in allen Hostanwendungen, die das Add-on erweitert. Achten Sie darauf, dass das Add-on-Verhalten korrekt ist, wenn sich der Nutzer von Kontext zu Kontext und zwischen kontextbezogenen und nicht kontextbezogenen Karten bewegt.
Wenn Ihr Add-on eine Verbindung zu einer Drittanbieter-API oder einem anderen Dienst herstellt, prüfen Sie, ob auf den Dienst zugegriffen werden kann und er sich wie erwartet verhält. Achten Sie darauf, dass Ihr Add-on die Autorisierungs- und Anmeldedaten richtig verarbeitet.
Achten Sie darauf, dass alle Fehlerbedingungen ordnungsgemäß behandelt werden. Verwenden Sie bei Bedarf Fehlerkarten.
Achten Sie auf die Leistung des Add-ons. Wenn Sie eine Änderung am Code vornehmen und das Add-on langsamer wird, müssen Sie diese Funktion möglicherweise entfernen oder überarbeiten.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Benötigte Informationen nicht gefunden","missingTheInformationINeed","thumb-down"],["Zu umständlich/zu viele Schritte","tooComplicatedTooManySteps","thumb-down"],["Nicht mehr aktuell","outOfDate","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Problem mit Beispielen/Code","samplesCodeIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2024-12-22 (UTC)."],[[["\u003cp\u003eUnpublished Google Workspace add-ons can be installed for testing and personal use directly from the Apps Script project.\u003c/p\u003e\n"],["\u003cp\u003eUsers need editor access to the script project to install and test the unpublished add-on.\u003c/p\u003e\n"],["\u003cp\u003eUninstalling an unpublished add-on removes it from all host applications and requires reinstallation for further use.\u003c/p\u003e\n"],["\u003cp\u003eThorough testing is crucial, including card navigation, data handling, external service integrations, error management, and performance evaluation.\u003c/p\u003e\n"]]],["To test an unpublished add-on, open its script project in the Apps Script editor and navigate to **Deploy \u003e Test deployments**. Click **Install**, then **Done** to make it available in host applications. Share the project for others to test. Uninstall by repeating the process and selecting **Uninstall**. Testing should include card navigation, example data evaluation, third-party service verification, error handling, and performance monitoring.\n"],null,["# Test and debug Apps Script Google Workspace add-ons\n\nWhen you publish an add-on, users can install it\nthrough the host application\nor the [Google Workspace Marketplace](https://workspace.google.com/marketplace/). Before you publish, test the\nadd-ons that you develop within the host applications that\nthey extend.\n\nThis page describes how to install an add-on that is\nunder development (called an *unpublished* or *developer*\nadd-on) for testing or\npersonal use. You can also debug add-ons using the\nApps Script\nIDE's [debugger and breakpoints](/apps-script/guides/support/troubleshooting#use-debugger).\n\nPrerequisites\n-------------\n\n- You must have editor access to the add-on's script project.\n- To let other people in your organization test the add-on, grant them editor access to the script project. For details about granting access, see [Collaborating with Other Developers](/apps-script/guides/collaborating).\n\nInstall an unpublished add-on\n-----------------------------\n\nYou can install unpublished add-ons from Apps Script's **Deployments**\ndialog.\n\nFollow these steps to install an unpublished\nGoogle Workspace add-on for testing:\n\n1. Open the script project in the Apps Script editor.\n2. Click **Deploy \\\u003e Test deployments**.\n3. Click **Install**.\n4. At the bottom, click **Done**.\n\nYou can let other users test the add-on by sharing the Apps Script project\nwith their account (edit access is required). Then prompt the users to\nfollow the above steps.\n\nOnce installed, the add-on is immediately available in host applications it\nextends. You may need to refresh the host application tab before the add-on\nappears. You must also\n[authorize](/workspace/add-ons/how-tos/authorizing-addons#authorizing_unpublished_g_suite_add-ons)\nthe add-on before using it.\n\nUninstall an unpublished add-on\n-------------------------------\n\nTo uninstall an unpublished add-on deployment, follow these steps:\n\n1. Open the script project in the Apps Script editor.\n2. Click **Deploy \\\u003e Test deployments**.\n3. Click **Uninstall**.\n4. At the bottom, click **Done**.\n\nThese steps immediately remove the deployment and the add-on no longer appears\nin any host application. You can reinstall the deployment at any time by\nrepeating the [install procedure](#install_an_unpublished_add-on).\n\nTesting best practices\n----------------------\n\nWhile testing your Google Workspace add-on, be sure\nto follow the\n[Best practices](/workspace/add-ons/guides/workspace-best-practices)\nfor add-on development. In addition, be sure to do the following:\n\n1. Test card navigation flows thoroughly in all the host applications the\n add-on extends. Make sure the add-on behavior is correct as the user moves\n from context to context, and between non-contextual and contextual cards.\n\n2. [Use example test data](/workspace/add-ons/guides/workspace-best-practices#_write_tests_and_test_messages)\n to evaluate your add-on's behavior.\n\n3. If your add-on connects to a third-party API or other service, verify\n that the service can be accessed and behaves as expected. Make sure\n your add-on is handling the\n [authorization and log-in details](/workspace/add-ons/how-tos/non-google-services)\n correctly.\n\n4. Make sure any error conditions are handled gracefully. [Use error cards](/workspace/add-ons/guides/workspace-best-practices#_use_error_cards)\n where needed.\n\n5. Pay attention to how performant the add-on is. If you make a change to the\n code and the add-on starts slowing down, you may need to remove or rework\n that feature."]]