測試與正式版
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
測試網路會提供與正式版 Google Ad Manager 帳戶完全隔離的資料環境,協助您測試程式碼。
您應先使用測試網路建構及測試程式碼,再將其用於實際工作環境帳戶。如需測試網路的其他功能,請與客戶經理聯絡。
如要建立測試網路,請呼叫 NetworkService.makeTestNetwork
。
每個用戶端程式庫中都包含 MakeTestNetwork
範例。每個 Google 帳戶只能建立一個測試網路。
測試網路具有以下限制:
- 每個實體類型最多只能使用 10,000 個物件。
- 測試聯播網無法放送廣告。
- 由於測試聯播網無法放送廣告,因此報表一律不會顯示資料。
- 由於預測需要服務記錄,因此預測結果會出現假的結果。詳情請參閱「預測服務」。
- 根據預設,測試聯播網並非 Ad Manager 360 聯播網,也就是說,這些聯播網沒有 Ad Manager 360 聯播網提供的付費功能。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-21 (世界標準時間)。
[null,null,["上次更新時間:2025-08-21 (世界標準時間)。"],[[["\u003cp\u003eTest networks provide an isolated environment for testing Google Ad Manager code before using it in production.\u003c/p\u003e\n"],["\u003cp\u003eYou can create one test network per Google account using the \u003ccode\u003eNetworkService.makeTestNetwork\u003c/code\u003e method, and client libraries include examples.\u003c/p\u003e\n"],["\u003cp\u003eTest networks have limitations, including a 10,000 object limit per entity, inability to serve ads or generate real report data, and faked forecasting results.\u003c/p\u003e\n"],["\u003cp\u003eIf creating a test network with a Service Account, add an Administrator user for UI access via \u003ccode\u003eUserService.createUsers\u003c/code\u003e.\u003c/p\u003e\n"]]],["Test networks offer isolated environments for testing code without affecting production accounts. Create one test network per Google account using `NetworkService.makeTestNetwork`, referencing client library examples. Service accounts require an added Administrator via `UserService.createUsers` for UI access. Test networks have limitations: 10,000 objects per entity, no ad serving, empty reports, faked forecasts, and lack of Ad Manager 360 premium features. Use these isolated test environments prior to using your production account.\n"],null,["# Test vs. Production\n\nTest networks help you test your code by providing a completely isolated\ndata environment from your production Google Ad Manager account.\n\nYou should build and test code using test networks before you start using it\nagainst your production account. If you need additional features added to your\ntest network, please speak to your account manager.\n\nTo create a test network, call [`NetworkService.makeTestNetwork`](/ad-manager/api/reference/latest/NetworkService#makeTestNetwork).\nA `MakeTestNetwork` example is included in each of the [client libraries](/ad-manager/api/clients). You can create only one test network for\nyour Google account.\n| **Important:** If you create a test network using a Service Account, you must also add an additional Administrator (`roleId -1`) to access the network's UI. To do so, call [`UserService.createUsers`](/ad-manager/api/reference/latest/UserService#createUsers).\n\nTest networks are limited in the following ways:\n\n- Test networks are limited to 10,000 objects per entity type.\n- Test networks cannot serve ads.\n- Because test networks cannot serve ads, reports will always come back without data.\n- Since forecasting requires serving history, forecast service results will be faked. See [ForecastService](/ad-manager/api/reference/latest/ForecastService) for more information.\n- Test networks are, by default, not Ad Manager 360 networks, meaning that they do not have the premium features found in Ad Manager 360 networks."]]