You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
6 days ago | |
---|---|---|
.. | ||
android-test | 6 days ago | |
electron-test | 6 days ago | |
ios-test | 6 days ago | |
README.md | 6 days ago | |
setup-android.sh | 6 days ago | |
setup-electron.sh | 6 days ago | |
setup-ios.sh | 6 days ago |
README.md
Test Apps Setup Guide
Overview
This guide creates minimal Capacitor test apps for validating the Daily Notification Plugin across all target platforms.
Directory Structure
test-apps/
├── android-test/ # Android test app
├── ios-test/ # iOS test app
├── electron-test/ # Electron test app
├── setup-android.sh # Android setup script
├── setup-ios.sh # iOS setup script
├── setup-electron.sh # Electron setup script
└── README.md # This guide
Prerequisites
- Node.js 18+
- Capacitor CLI:
npm install -g @capacitor/cli
- Android Studio (for Android)
- Xcode (for iOS)
- Platform-specific SDKs
Quick Start
Option 1: Automated Setup (Recommended)
# Setup all platforms
./setup-android.sh
./setup-ios.sh
./setup-electron.sh
Option 2: Manual Setup
# Android
cd android-test
npm install
npx cap init "Daily Notification Android Test" "com.timesafari.dailynotification.androidtest"
npx cap add android
npm run build
npx cap sync android
# iOS
cd ios-test
npm install
npx cap init "Daily Notification iOS Test" "com.timesafari.dailynotification.iostest"
npx cap add ios
npm run build
npx cap sync ios
# Electron
cd electron-test
npm install
npm run build-web
Test App Features
Each test app includes:
- Plugin Configuration: Test shared SQLite, TTL, prefetch settings
- Notification Scheduling: Basic daily notification setup
- Platform-Specific Features:
- Android: Exact alarm permissions, reboot recovery
- iOS: Rolling window management, BGTaskScheduler
- Electron: Mock implementations, IPC communication
- Performance Monitoring: Metrics collection and display
- Error Handling: Comprehensive error testing
- Debug Information: Platform-specific debug data
Platform-Specific Testing
Android Test App
- Exact Alarm Status: Check permission and capability
- Permission Requests: Test exact alarm permission flow
- Performance Metrics: Monitor Android-specific optimizations
- Reboot Recovery: Validate system restart handling
iOS Test App
- Rolling Window: Test notification limit management
- Background Tasks: Validate BGTaskScheduler integration
- Performance Metrics: Monitor iOS-specific optimizations
- Memory Management: Test object pooling and cleanup
Electron Test App
- Mock Implementations: Test web platform compatibility
- IPC Communication: Validate Electron-specific APIs
- Development Workflow: Test plugin integration
- Debug Information: Platform-specific status display
Running the Test Apps
Android
cd android-test
npm run dev # Web development server
npx cap open android # Open in Android Studio
npx cap run android # Run on device/emulator
iOS
cd ios-test
npm run dev # Web development server
npx cap open ios # Open in Xcode
npx cap run ios # Run on device/simulator
Electron
cd electron-test
npm start # Run Electron app
npm run dev # Run in development mode
Testing Checklist
Core Functionality
- Plugin configuration works
- Notification scheduling succeeds
- Error handling functions properly
- Performance metrics are accurate
Platform-Specific
- Android exact alarm permissions
- iOS rolling window management
- Electron mock implementations
- Cross-platform API consistency
Integration
- Plugin loads without errors
- Configuration persists across sessions
- Performance optimizations active
- Debug information accessible
Troubleshooting
Common Issues
- Build Failures: Ensure all dependencies installed
- Platform Errors: Check platform-specific SDKs installed
- Permission Issues: Verify platform permissions configured
- Sync Problems: Run
npx cap sync
after changes
Development Tips
- Use
npm run dev
for web testing - Use platform-specific tools for native testing
- Check console logs for detailed error information
- Test on both physical devices and simulators
Next Steps
- Run Setup Scripts: Execute platform-specific setup
- Test Core Features: Validate basic functionality
- Test Platform Features: Verify platform-specific capabilities
- Integration Testing: Test with actual plugin implementation
- Performance Validation: Monitor metrics and optimizations