Skip to content

Testing

Testing in Demo App

  1. Install plugin to demo:

    ./script/build.sh -D
    

  2. Open demo project:

    cd demo
    godot project.godot
    

  3. Configure test ads:

  4. Use test ad unit IDs from Google AdMob documentation
  5. Edit demo/main.gd or relevant scene scripts

  6. Run and test features:

  7. Banner ads
  8. Interstitial ads
  9. Rewarded ads
  10. App open ads
  11. Native ads

Android Testing

# Build and install
./script/build.sh -caD

# Export Android build from Godot
# Install on device/emulator
adb install demo/export/android/demo.apk

# View logs
adb logcat | grep -i AdmobPlugin

iOS Testing (macOS only)

# Build and install
./script/build.sh -I -D

# Open in Xcode
cd demo
open ios/demo.xcodeproj

# Build and run on simulator/device from Xcode

Automated Testing

Consider adding: - Unit tests for native code - Integration tests for ad loading - UI tests for demo app - CI/CD pipeline (GitHub Actions)