# MRT-M05: Mobile testing environment setup guide
**Area:** Mobile-Responsive Testing
**Model:** minimax/minimax-m2.5
**Tokens:** 3,248
**Cost:** $0.0032
**Time:** 2678ms
**Timestamp:** 2026-02-16T12:17:57.800909

---

# Mobile Testing Environment Setup Guide

This guide covers four approaches to mobile testing: cloud-based services, local device labs, browser-based emulation, and physical device procurement. Use the sections relevant to your team's setup.

---

## 1. BrowserStack Configuration

BrowserStack provides cloud-based access to 3,000+ real devices without hardware procurement. For a voice widget like Sunaiva, this is essential for testing across the fragmented Australian mobile market.

### 1.1 Account Setup

1. Create a BrowserStack account at [browserstack.com](https://browserstack.com)
2. Select a plan:
   - **Live** ($29/mo): Real device testing, manual and automated
   - **Automate** ($49/mo): Selenium/Appium automation integration
   - **Enterprise**: Single sign-on, priority support, unlimited users
3. Note your **username** and **access key** from the account dashboard

### 1.2 Manual Testing Configuration

For quick visual and functional testing:

1. Log into BrowserStack Live
2. Select device criteria:
   - **OS**: iOS 14+, Android 10+
   - **Browser**: Safari (iOS), Chrome (Android)
   - **Resolution**: Match Australian market share (see device recommendations below)
3. Enter your Sunaiva staging URL in the address bar
4. Test the following voice widget interactions:
   - Tap-to-call button visibility
   - Microphone permission prompts
   - Call connection quality
   - UI responsiveness on various screen sizes

### 1.3 Local Testing (Testing Localhost/Staging)

To test sites not publicly accessible:

1. Download BrowserStack's **Binary** for your OS from their documentation
2. Run the connection command:

   ```bash
   # macOS/Linux
   ./browserstack-sdk --key YOUR_ACCESS_KEY

   # Windows
   browserstack-sdk.exe --key YOUR_ACCESS_KEY
   ```

3. Configure your test to use `http://localhost:3000` or your local server IP
4. BrowserStack tunnels the connection to their cloud devices

### 1.4 Automate Integration (Optional)

For regression testing in CI/CD:

1. Install BrowserStack SDK or add dependencies:

   ```bash
   # npm
   npm install @browserstack/browserstack-sdk

   # Python
   pip install browserstack-sdk
   ```

2. Configure `browserstack.yml`:

   ```yaml
   browsers:
     - device: iPhone 14 Pro
       os_version: "16.0"
       browser: Safari
     - device: Samsung Galaxy S23
       os_version: "13"
       browser: Chrome
   ```

3. Run tests through your existing test framework

### 1.5 BrowserStack Limitations

- **Latency**: Interactions feel slightly delayed compared to local testing
- **Audio**: Voice call quality testing is unreliable in cloud environments
- **Cost**: Scales with team size; factor into budget for agency partnerships

---

## 2. Local Device Lab Setup

A local device lab provides fast iteration, reliable audio testing, and no per-minute costs. Ideal for teams doing frequent voice widget development.

### 2.1 Physical Requirements

**Minimum viable setup (2-3 devices):**
- 1 x iPhone (current or previous generation)
- 1 x Android mid-range (Samsung A-series, Pixel a-series)
- 1 x Android flagship (optional, for performance benchmarking)

**Recommended setup (5-7 devices):**
- iPhone 15 Pro or 14 Pro
- iPhone 13 or SE (budget option)
- Samsung Galaxy S24 or S23
- Google Pixel 8
- Samsung Galaxy A54 or similar (mid-range Android)
- iPad (if tablet support matters)

### 2.2 Device Management

1. **Device Organisation:**
   - Label each device with its model and OS version
   - Keep devices unboxed and charged
   - Designate a charging station

2. **Developer Mode Enablement:**

   *Android:*
   - Go to Settings > About Phone
   - Tap Build Number 7 times
   - Enable USB Debugging in Developer Options

   *iOS:*
   - Connect to Mac with cable
   - Open Xcode > Window > Devices
   - Device appears for debugging

3. **MDM/Enrollment (Optional):**
   - For larger teams, use Apple Business Manager or Android Device Manager
   - Enables remote lock/wipe, app deployment

### 2.3 Network Configuration

1. Create a dedicated **test WiFi network**:
   - Separate from main office network
   - Use a basic consumer router (ASUS RT-AC68U, TP-Link Archer AX50)
   - Network name: `Sunaiva-Test-2.4GHz` and `Sunaiva-Test-5GHz`

2. Configure static DHCP reservations for each device:
   - Easier for accessing device IP for local testing
   - Check your router's DHCP reservation settings

3. Consider a **VPN** if testing remote scenarios:
   - WireGuard or OpenVPN on a cloud server
   - Test how the widget performs on varying network conditions

### 2.4 Storage and Organisation

| Item | Purpose | Example |
|------|---------|---------|
| Charging station | Keep devices powered | Anker 10-port USB charger |
| Device rack | Organise idle devices | Generic plastic drawer unit |
| Cables | Debugging and charging | 6 x Lightning, 6 x USB-C |
| Labels | Identify devices | Brother P-touch or similar |
| Documentation | Track OS versions, quirks | Shared Google Sheet |

### 2.5 Device Refresh Strategy

- **Annually**: Replace primary devices (iPhone, Samsung flagship)
- **Bi-annually**: Rotate in new mid-range Android models
- **Ongoing**: Track device market share in your target audience

---

## 3. Chrome DevTools Device Mode

Device Mode in Chrome DevTools provides quick responsive testing and JavaScript debugging. Not a replacement for real device testing, but excellent for rapid iteration.

### 3.1 Enabling Device Mode

1. Open Chrome DevTools (F12 or Cmd+Opt+I)
2. Click the **Device Toggle** icon (top-left, looks like a phone/tablet), or press `Cmd+Shift+M` (Mac) / `Ctrl+Shift+M` (Windows)

### 3.2 Device Presets

Chrome includes common device presets:

| Device | Viewport | Use Case |
|--------|----------|----------|
| iPhone SE | 375 × 667 | Small phone |
| iPhone 12 Pro | 390 × 844 | Modern iPhone |
| iPhone 14 Pro | 393 × 852 | Current iPhone |
| Pixel 7 | 412 × 915 | Stock Android |
| iPad Pro 11 | 834 × 1194 | Tablet |
| iPad Mini | 768 × 1024 | Small tablet |

### 3.3 Custom Device Configuration

For Australian market testing, add custom devices:

1. Click the **Device dropdown** (top of Device Mode toolbar)
2. Select **Edit...**
3. Click **Add custom device** and enter:

   ```
   Samsung Galaxy A54 (popular in Australia)
   Width: 412
   Height: 915
   Device pixel ratio: 2.5
   User agent: (use Chrome's default for similar device)
   ```

4. Add any devices from your local lab for consistency

### 3.4 Network Throttling

Test performance on slower connections:

1. In Device Mode, find the **Network dropdown** (usually shows "No throttling")
2. Select presets:
   - **Fast 3G**: Good for initial testing
   - **Slow 3G**: Tests degraded performance
   - **Custom**: Create specific profiles

3. For voice widget testing, specifically test:
   - Slow 3G: Does audio buffer excessively?
   - Offline: Does the widget handle gracefully?

### 3.5 Touch Simulation

1. Enable **Touch** in the Device Mode toolbar
2. Hold `Shift` and drag to simulate touch-and-hold gestures
3. Note: Chrome's touch simulation is approximate—always verify on real devices

### 3.6 Limitations

- **No microphone/ audio APIs**: Voice widget functionality cannot be tested
- **CSS rendering differences**: Mobile Safari and Chrome Android render differently
- **No hardware sensors**: GPS, accelerometer, gyroscope unavailable
- **JavaScript engine**: V8 differs from WebKit (iOS) and Chromium (Android)

---

## 4. Real Device vs Emulator Trade-offs

Use this matrix to decide which testing approach suits each scenario.

| Factor | Real Devices | Emulators/Simulators | Cloud (BrowserStack) |
|--------|--------------|---------------------|---------------------|
| **Audio/voice testing** | ✅ Full testing possible | ❌ Not supported | ⚠️ Unreliable |
| **Hardware sensors** | ✅ Complete access | ❌ Most unavailable | ⚠️ Limited |
| **Latency** | None | Minimal | Moderate |
| **Setup cost** | $1,000-3,000 initial | Free (Simulators) or $100+ (Android Studio) | $29-200/mo |
| **Maintenance** | Device replacement, repairs | OS updates, disk space | Managed by provider |
| **Test automation** | ✅ Full support | ✅ Full support | ✅ Full support |
| **Parallel testing** | Limited by hardware | Limited by machine specs | Virtually unlimited |
| **iOS testing** | Requires Mac + devices | Simulator (Mac only) | Any browser |
| **Australian carrier testing** | ✅ Full | ❌ No | ❌ No |
| **Team collaboration** | Requires device sharing | Multiple instances | Web access |

### Recommended Testing Matrix

| Testing Type | Primary Approach | Secondary |
|--------------|------------------|-----------|
| UI/Responsive | Emulator/Simulator | Real device |
| Voice functionality | Real device | Cloud |
| Performance profiling | Real device | Cloud |
| Automated regression | Cloud | Real device |
| Network condition testing | Real device (local WiFi) | Chrome DevTools |
| Debugging specific issues | Real device | Emulator |

---

## 5. Recommended Test Devices to Purchase

Prioritise devices matching Australian market share and your user demographics.

### 5.1 Priority Purchase List

| Priority | Device | Rationale | Approx. Cost |
|----------|--------|-----------|--------------|
| 1 | iPhone 15 Pro or 14 Pro | Market leader in AU (~50% iOS) | $1,100-1,500 |
| 2 | Samsung Galaxy S24 or S23 | Top Android flagship | $1,000-1,200 |
| 3 | Google Pixel 8 | Stock Android experience | $900-1,000 |
| 4 | iPhone SE (2022) | Budget iOS option | $450-550 |
| 5 | Samsung Galaxy A54 | Popular mid-range Android | $400-500 |
| 6 | iPad (9th/10th gen) | Tablet testing | $400-600 |
| 7 | Older iPhone 12 | Legacy iOS testing | $400-500 |

### 5.2 Australian Market Considerations

- **iOS dominance**: iOS holds ~55-60% market share in Australia
- **Mid-range Android**: Samsung A-series and OPPO/Reno are popular at lower price points
- **Older devices**: Many tradies use 2-3 year old devices—test on iPhone 11, Samsung S20 equivalents
- **Budget Android**: Test on sub-$300 devices (OPPO A54, Samsung A13) for accessibility

### 5.3 Sunaiva-Specific Recommendations

For voice widget testing specifically:

1. **Audio quality**: Test on devices with different microphone placements
2. **Speaker volume**: Tradies often use speakerphone—test maximum volume and clarity
3. **Background noise**: Real device testing essential for this
4. **Hearing aid compatibility**: Consider adding a device with hearing aid support for accessibility

### 5.4 Where to Purchase

| Source | Pros | Cons |
|--------|------|------|
| Apple Store (refurbished) | Warrantied, like new | Limited stock |
| Amazon AU | Good prices, Prime | Mixed seller quality |
| JB Hi-Fi / Harvey Norman | In-person inspection | Full retail price |
| Kogan / Tech Deals | Low prices | Limited warranty |
| Swappa / eBay (used) | Cheapest | No warranty, potential issues |

---

## Summary

1. **Start with BrowserStack** for immediate cross-device access and team collaboration
2. **Build a local device lab** with 3-5 devices matching Australian market share
3. **Use Chrome DevTools** for rapid responsive iteration
4. **Always verify voice functionality** on real devices before release
5. **Budget for annual device refresh** to keep your test suite relevant

---

*Document version: 1.0 | Last updated: [Current Date]*