בדיקה ותיקון באגים בתוספים של Google Workspace ל-Apps Script
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
כשמפרסמים תוסף, המשתמשים יכולים להתקין אותו דרך האפליקציה המארחת או דרך Google Workspace Marketplace. לפני הפרסום, כדאי לבדוק את התוספים שאתם מפתחים באפליקציות המארחות שהם מרחיבות.
בדף הזה נסביר איך להתקין תוסף שנמצא בפיתוח (נקרא תוסף לא פורסם או תוסף למפתחים) לצורך בדיקה או לשימוש אישי. אפשר גם לנפות באגים בתוספים באמצעות כלי ניפוי הבאגים ונקודות העצירה של סביבת הפיתוח המשולבת של Apps Script.
דרישות מוקדמות
- צריכה להיות לכם הרשאת עריכה בפרויקט הסקריפט של התוסף.
- כדי לאפשר לאנשים אחרים בארגון לבדוק את התוסף, צריך לתת להם הרשאת עריכה לפרויקט הסקריפט. פרטים על מתן גישה זמינים במאמר שיתוף פעולה עם מפתחים אחרים.
התקנת תוסף שלא פורסם
אפשר להתקין תוספים שלא פורסמו בתיבת הדו-שיח פריסות של Apps Script.
כדי להתקין תוסף ל-Google Workspace לצורך בדיקה, פועלים לפי השלבים הבאים:
- פותחים את פרויקט הסקריפט בכלי העריכה של Apps Script.
- לוחצים על Deploy (פריסה) > Test deployments (בדיקת הפריסות).
- לוחצים על התקנה.
- בתחתית המסך, לוחצים על סיום.
כדי לאפשר למשתמשים אחרים לבדוק את התוסף, אפשר לשתף את הפרויקט ב-Apps Script עם החשבון שלהם (נדרשת הרשאת עריכה). לאחר מכן, מבקשים מהמשתמשים לפעול לפי השלבים שלמעלה.
אחרי ההתקנה, התוסף זמין באופן מיידי באפליקציות המארחות שהוא מרחיב. יכול להיות שתצטרכו לרענן את הכרטיסייה של אפליקציית המארח כדי שהתוסף יופיע. בנוסף, צריך להעניק הרשאה לתוסף לפני שמשתמשים בו.
הסרת תוסף שלא פורסם
כדי להסיר פריסה של תוסף שלא פורסם:
- פותחים את פרויקט הסקריפט בכלי העריכה של Apps Script.
- לוחצים על Deploy (פריסה) > Test deployments (בדיקת הפריסות).
- לוחצים על הסרה.
- בתחתית המסך, לוחצים על סיום.
השלבים האלה מסירים את הפריסה באופן מיידי, והתוסף לא מופיע יותר באף אפליקציית מארח. אפשר להתקין מחדש את הפריסה בכל שלב על ידי חזרה על נוהל ההתקנה.
שיטות מומלצות לבדיקות
בזמן הבדיקה של התוסף ל-Google Workspace, חשוב לפעול לפי השיטות המומלצות לפיתוח תוספים. בנוסף, חשוב לבצע את הפעולות הבאות:
בודקים את תהליך הניווט בכרטיסים בכל האפליקציות המארחות שהתוסף מרחיב אליהן. חשוב לוודא שההתנהגות של התוסף תקינה כשהמשתמש עובר ממסגרת הקשר אחת למסגרת הקשר אחרת, ומכרטיסים ללא הקשר לכרטיסים לפי הקשר.
משתמשים בנתוני בדיקה לדוגמה כדי להעריך את ההתנהגות של התוסף.
אם התוסף מתחבר ל-API של צד שלישי או לשירות אחר, צריך לוודא שאפשר לגשת לשירות והוא פועל כצפוי. חשוב לוודא שהתוסף מטפל בצורה נכונה בפרטי ההרשאה וההתחברות.
חשוב לוודא שכל תנאי השגיאה מטופלים בצורה תקינה. משתמשים בכרטיסי שגיאה לפי הצורך.
חשוב לשים לב לביצועים של התוסף. אם מבצעים שינוי בקוד והתוסף מתחיל לפעול לאט יותר, יכול להיות שתצטרכו להסיר את התכונה הזו או לשנות אותה.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-12-22 (שעון UTC).
[null,null,["עדכון אחרון: 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."]]