이 가이드에는 광고 통합 과정에서 테스트 광고를 수신하는 방법이 나와 있습니다. 개발 중에는 테스트 광고를 사용하여 광고를 클릭해도 Google 광고주에게 비용이 청구되지 않게 하는 것이 중요합니다. 테스트 모드가 아닌 상태에서 광고를 너무 많이 클릭하면
무효 활동으로 계정이 신고될 수 있습니다.
프로덕션용 광고로 더욱 엄격한 테스트를 진행하려는 경우 이제 기기를 테스트 기기로 구성하고 AdMob UI에서 생성한 자체 광고 단위 ID를 사용할 수 있습니다. 테스트 기기는 AdMob UI에서 추가하거나 Google 모바일 광고 SDK를 통해 프로그래매틱 방식으로 추가할 수 있습니다.
기기를 테스트 기기로 추가하려면 아래 단계를 따르세요.
AdMob UI에서 테스트 기기 추가하기
간단한 비프로그래매틱 방식으로 테스트 기기를 추가하고 신규 또는 기존 앱 빌드를 테스트하려면
AdMob UI를 사용하세요.
자세히 알아보기
테스트 기기를 프로그래매틱 방식으로 추가하기
개발하면서 내 앱에서 광고를 테스트하려는 경우에는 아래 단계에 따라 테스트 기기를 프로그래매틱 방식으로 등록하세요.
코드를 수정하여 SetRequestConfiguration를 통해 테스트 기기를 설정합니다.
// Set a sample device ID of 2077ef9a63d2b398840261c8221a0c9bfirebase::gma::RequestConfigurationrequest_configuration=firebase::gma::GetRequestConfiguration();request_configuration.test_device_ids.push_back("2077ef9a63d2b398840261c8221a0c9b");firebase::gma::SetRequestConfiguration(request_configuration);
앱을 다시 실행하세요. 광고가 Google 광고이면 광고 상단 중앙에 배너 광고, 전면 광고,
보상형 광고 등 테스트 모드 라벨이 표시됩니다.
이 테스트 모드 라벨이 표시된 광고는 클릭해도 문제가 발생하지 않습니다. 테스트 모드인 광고에서 발생한 요청, 노출, 클릭은 계정 보고서에 표시되지 않습니다.
미디에이션을 이용해 테스트하기
Google의 데모 광고 단위에는 Google 광고만 표시됩니다. 미디에이션 구성을 테스트하려면 테스트 기기 사용 방식을
이용해야 합니다.
미디에이션된 광고에서는 테스트 모드 라벨을 렌더링하지 않습니다. 네트워크에서 계정의 무효 활동을 신고하지 않도록 미디에이션 네트워크별로 테스트 모드를 사용 설정해야 합니다. 자세한 내용은 네트워크별 미디에이션 가이드를 참고하세요.
미디에이션 광고 네트워크 어댑터가 테스트 모드를 제공하는지 확실하지 않으면
개발 중에 해당 네트워크에 게재된 광고는 클릭하지 않는 것이 좋습니다. 모든 광고 형식에서 ResponseInfo::mediation_adapter_class_name() 메서드를 사용하여 현재 광고를 게재한 광고 네트워크를 확인할 수 있습니다.
[null,null,["최종 업데이트: 2025-09-02(UTC)"],[[["\u003cp\u003eThe Google Mobile Ads C++ SDK is deprecated and will be end-of-maintenance on June 17, 2025; consider using the iOS or Android SDKs instead.\u003c/p\u003e\n"],["\u003cp\u003eDuring development, utilize test ads by using Google's demo ad units or enabling test mode to prevent invalid activity flags on your account.\u003c/p\u003e\n"],["\u003cp\u003eReplace demo ad unit IDs with your own before publishing and remember that Android and iOS simulators are automatically configured as test devices.\u003c/p\u003e\n"],["\u003cp\u003eWhen enabling test mode programmatically, ensure to remove the test device ID code before releasing your app.\u003c/p\u003e\n"],["\u003cp\u003eMediated ads do not display a "Test mode" label; consult each network's mediation guide to ensure test mode is enabled and avoid clicking ads from networks without a confirmed test mode during development.\u003c/p\u003e\n"]]],["The Google Mobile Ads C++ SDK is deprecated as of June 17, 2024, with maintenance ending June 17, 2025; AdMob's iOS and Android SDKs are recommended replacements. To test ads, use Google's demo ad units or enable test mode with your own. Demo units prevent invalid traffic, while test mode lets you configure your device, either in the AdMob UI or programmatically via the SDK, and use your own ad unit IDs. If using mediated ads, ensure each network is in test mode.\n"],null,["| **DEPRECATED:** The Google Mobile Ads C++ SDK is *deprecated* as of June 17, 2024 and should not be adopted in projects that don't already use it. It will enter *End-of-Maintenance (EoM)* on June 17, 2025. Note that versions of the SDK released before the EoM date will continue to function, but no further bug fixes or changes will be released after the EoM date.\n|\n| Instead of the Google Mobile Ads C++ SDK, consider using the\n| [iOS](/admob/ios/quick-start) and\n| [Android](/admob/android/quick-start) SDKs from AdMob.\n| For support, reach out to the\n| [Google Mobile Ads SDK Technical Forum](https://groups.google.com/g/google-admob-ads-sdk).\n\n\u003cbr /\u003e\n\nThis guide explains how to receive test ads in your ads integration. It is\nimportant to use test ads during development so that you can click on them\nwithout charging Google advertisers. If you click on too many ads without being\nin test mode, you risk your account being flagged for invalid activity.\n\nThere are two ways to get test ads:\n\n1. Use one of Google's [demo ad units](#demo_ad_units).\n\n2. Use your own ad unit and [enable test mode](#enable_test_devices).\n\nDemo ad units\n\nThe quickest way to enable testing is to use Google-provided demo ad units.\nThese ad units are not associated with your AdMob account, so there's no risk of\nyour account generating invalid traffic when using these ad units.\n| **Key Point:** Make sure you replace these IDs with your own ad unit ID before publishing your app.\n\nHere are demo ad units that point to specific test creatives for each format: \n\nAndroid\n\n| Ad format | Sample ad unit ID |\n|-----------------------------------------|------------------------------------------|\n| [Banner](/admob/cpp/banner) | `ca-app-pub-3940256099942544/6300978111` |\n| [Interstitial](/admob/cpp/interstitial) | `ca-app-pub-3940256099942544/1033173712` |\n| [Rewarded](/admob/cpp/rewarded) | `ca-app-pub-3940256099942544/5224354917` |\n\niOS\n\n| Ad format | Sample ad unit ID |\n|-----------------------------------------|------------------------------------------|\n| [Banner](/admob/cpp/banner) | `ca-app-pub-3940256099942544/2934735716` |\n| [Interstitial](/admob/cpp/interstitial) | `ca-app-pub-3940256099942544/4411468910` |\n| [Rewarded](/admob/cpp/rewarded) | `ca-app-pub-3940256099942544/1712485313` |\n\nEnable test devices (Test mode)\n\nIf you want to do more rigorous testing with production-looking ads, you can now\nconfigure your device as a test device and use your own ad unit IDs that you've\ncreated in the AdMob UI. Test devices can either be added in the AdMob UI or\nprogrammatically using the Google Mobile Ads SDK.\n\nFollow the steps below to add your device as a test device.\n| **Key Point:** Android and iOS simulators are automatically configured as test devices.\n\nAdd your test device in the AdMob UI\n\nFor a simple, non-programmatic way to add a test device and test new or existing\napp builds, use the AdMob UI.\n[Learn how](//support.google.com/admob/answer/9691433).\n| **Key Point:** New test devices typically start serving test ads in your app within 15 minutes, but it can also take up to 24 hours.\n\nAdd your test device programmatically\n\nIf you want to test ads in your app as you're developing, follow the steps below\nto programmatically register your test device.\n\n1. Load your ads-integrated app and make an ad request.\n\n2. Check the console for a message that looks like this:\n\n Android \n\n ```c++\n I/Ads: Use RequestConfiguration.Builder.setTestDeviceIds(Arrays.asList(\"33BE2250B43518CCDA7DE426D04EE231\"))\n to get test ads on this device.\"\n \n ```\n\n iOS \n\n ```c++\n \u003cGoogle\u003e To get test ads on this device, set:\n GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers = @[ @\"2077ef9a63d2b398840261c8221a0c9b\" ];\n \n ```\n\n Copy your test device ID to your clipboard.\n | **Note:** Be sure to remove the code that sets these test device IDs before you release your app.\n3. Modify your code to set the test device ID through `SetRequestConfiguration`:\n\n ```c++\n // Set a sample device ID of 2077ef9a63d2b398840261c8221a0c9b\n firebase::gma::RequestConfiguration request_configuration =\n firebase::gma::GetRequestConfiguration();\n request_configuration.test_device_ids.push_back(\"2077ef9a63d2b398840261c8221a0c9b\");\n firebase::gma::SetRequestConfiguration(request_configuration);\n ```\n4. Re-run your app. If the ad is a Google ad, you'll see a **Test mode** label\n centered at the top of the ad (banner, interstitial, or rewarded ad):\n\nAds with this **Test mode** label are safe to click. Requests, impressions, and\nclicks on ads in test mode will not show up in your account's reports.\n| **Key Point:** Mediated ads do NOT render a **Test mode** label. See the section below for details.\n\nTesting with mediation\n\nGoogle's demo ad units only show Google ads. To test your mediation\nconfiguration, you must use the [enable test devices](#enable_test_devices)\napproach.\n\nMediated ads do not render a **Test mode** label. You are responsible for ensuring\nthat test mode is enabled for each of your mediation networks so that these\nnetworks don't flag your account for invalid activity. See each network's\nrespective [mediation guide](/admob/cpp/mediation) for more\ninformation.\n\nIf you aren't sure whether a mediation ad network adapter provides a test mode,\nit is safest to avoid clicking on ads from that network during development. You\ncan use the `ResponseInfo::mediation_adapter_class_name()` method on any of the\nad formats to figure out which ad network served the current ad."]]