Skip to content

Latest commit

 

History

History
428 lines (315 loc) · 8.18 KB

File metadata and controls

428 lines (315 loc) · 8.18 KB

Testing Guide

Comprehensive testing procedures for the Life in Between XR application.

Table of Contents

Testing Overview

Testing Strategy

  • Unit Tests: Individual components
  • Integration Tests: Component interactions
  • System Tests: Full application flow
  • Device Tests: Real device testing
  • AR Tests: ARCore functionality
  • Performance Tests: Performance benchmarks

Testing Environments

  1. Unity Editor: Initial testing
  2. Development Build: Early device testing
  3. Release Build: Final testing before deployment

Test Scenes

Scene00_MainMenu.unity

Purpose: Main menu and navigation

Test Cases:

  • Menu loads correctly
  • All buttons functional
  • Navigation to other scenes works
  • UI elements display correctly
  • Animations play smoothly

How to Test:

  1. Open scene in Unity Editor
  2. Press Play
  3. Click through all menu options
  4. Verify navigation works

Test00_Autocomplete.unity

Purpose: Autocomplete search functionality

Test Cases:

  • Search field accepts input
  • Autocomplete suggestions appear
  • Suggestions filter correctly
  • Selection works
  • Results display properly
  • Line filtering works

Test Data:

  • Test with various search terms
  • Test with no results
  • Test with special characters
  • Test with long queries

How to Test:

  1. Open scene
  2. Select a transit line
  3. Type in search field
  4. Verify autocomplete appears
  5. Select a suggestion
  6. Verify result

Test01_3dMap.unity

Purpose: 3D map rendering

Test Cases:

  • 3D map loads
  • Buildings render correctly
  • Materials applied correctly
  • Camera controls work
  • Performance acceptable
  • Map data loads

How to Test:

  1. Open scene
  2. Press Play
  3. Verify map displays
  4. Test camera movement
  5. Check frame rate
  6. Verify building data

WoOz_00_Videogame.unity

Purpose: Demo/prototype scene

Test Cases:

  • Scene loads
  • All assets present
  • Interactions work
  • Performance acceptable

Unit Testing

Script Testing

Test individual scripts in isolation:

LineSelector Tests

// Test line selection
[Test]
public void SelectLine_SelectsCorrectLine()
{
    // Arrange
    var selector = new LineSelector();
    var line1 = new Line { name = "Red Line" };
    var line2 = new Line { name = "Blue Line" };
    selector.LinesList = new List<Line> { line1, line2 };
    
    // Act
    selector.SelectLine("Red Line");
    
    // Assert
    Assert.IsTrue(line1.selected);
    Assert.IsFalse(line2.selected);
}

UIManager Tests

// Test UI visibility
[Test]
public void Update_HidesSelectorWhenSearchActive()
{
    // Arrange
    var uiManager = new UIManager();
    uiManager.searchDropdown = new GameObject();
    uiManager.selectorBar = new GameObject();
    
    // Act
    uiManager.searchDropdown.SetActive(true);
    uiManager.Update();
    
    // Assert
    Assert.IsFalse(uiManager.selectorBar.activeSelf);
}

Test Framework

Use Unity Test Framework:

  • Window > General > Test Runner
  • Create test assemblies
  • Write test scripts
  • Run tests

Integration Testing

Component Integration

Test how components work together:

  1. Line Selection + Search:

    • Select line
    • Verify search filters by line
    • Change line
    • Verify search updates
  2. Search + 3D Map:

    • Search for location
    • Verify map updates
    • Verify location highlighted
  3. UI Manager + Components:

    • Open search
    • Verify selector hides
    • Close search
    • Verify selector shows

Scene Integration

Test full scene flows:

  • Menu → Search Scene
  • Menu → Map Scene
  • Search → Map navigation
  • Back navigation

Device Testing

Pre-Device Testing

Before testing on device:

  1. Build Configuration:

    • Development build for debugging
    • Enable script debugging
    • Enable profiler connection
  2. Device Setup:

    • Enable Developer Options
    • Enable USB Debugging
    • Install ARCore
    • Ensure sufficient storage

Device Test Checklist

Installation

  • App installs successfully
  • No installation errors
  • App appears in app drawer
  • Icon displays correctly

First Launch

  • App launches without crash
  • Splash screen displays
  • Main menu loads
  • No errors in logcat

Core Functionality

  • AR features work
  • Search works
  • 3D map displays
  • Line selection works
  • Bookmarks work

Performance

  • Frame rate acceptable (30+ FPS)
  • No stuttering
  • Memory usage reasonable
  • Battery usage acceptable
  • No overheating

Edge Cases

  • No internet connection
  • Poor AR tracking
  • Low storage space
  • Background/foreground
  • App killed and restarted

Device Matrix

Test on various devices:

Device Android Version ARCore Status
Google Pixel 6 Android 12 Yes Tested
Samsung Galaxy S21 Android 11 Yes Tested
Older Device Android 8 No N/A

AR Testing

ARCore Functionality

Plane Detection

  • Planes detected on flat surfaces
  • Planes update correctly
  • Multiple planes supported
  • Plane removal works

Tracking

  • Tracking stable
  • No drift
  • Handles movement well
  • Recovers from tracking loss

Lighting Conditions

Test in various lighting:

  • Bright daylight
  • Indoor lighting
  • Low light
  • Mixed lighting

Surface Types

Test on different surfaces:

  • Wood table
  • Carpet floor
  • Tile floor
  • Avoid: mirrors, glass, blank walls

AR Test Procedure

  1. Environment Setup:

    • Well-lit area
    • Textured surfaces
    • Sufficient space
  2. Launch App:

    • Grant camera permission
    • Wait for AR session start
  3. Test Plane Detection:

    • Move device slowly
    • Point at flat surface
    • Verify plane appears
  4. Test Tracking:

    • Move device around
    • Verify tracking stable
    • Test rapid movement
  5. Test Recovery:

    • Cover camera briefly
    • Uncover camera
    • Verify tracking recovers

Performance Testing

Frame Rate Testing

  • Target: 30+ FPS minimum, 60 FPS ideal
  • Tool: Unity Profiler
  • Method: Profile during typical usage

Memory Testing

  • Tool: Unity Profiler
  • Check: Memory leaks
  • Monitor: Over time, during extended use

Battery Testing

  • Method: Extended use testing
  • Monitor: Battery drain rate
  • Compare: With similar apps

Network Testing

  • Monitor: API call frequency
  • Check: Data usage
  • Test: Offline functionality

Test Checklist

Pre-Release Testing

Functionality

  • All features work
  • No crashes
  • No console errors
  • UI responsive

AR Features

  • ARCore works
  • Plane detection works
  • Tracking stable
  • Works in various conditions

Performance

  • Frame rate acceptable
  • Memory usage reasonable
  • No memory leaks
  • Battery usage acceptable

Compatibility

  • Works on target Android versions
  • Works on various devices
  • Handles different screen sizes
  • Works with/without internet

Edge Cases

  • No internet connection
  • Poor AR conditions
  • Low storage
  • Background/foreground
  • App killed

Regression Testing

After each change:

  • Run full test suite
  • Test affected features
  • Test related features
  • Verify no regressions

Automated Testing (Future)

Consider implementing:

  • Unit test automation
  • Integration test automation
  • UI test automation
  • Performance test automation

Test Documentation

Test Results

Document test results:

  • Test date
  • Device tested
  • Android version
  • Test results
  • Issues found
  • Screenshots/videos

Bug Reports

When bugs found:

  • Document steps to reproduce
  • Capture logs
  • Take screenshots
  • Note device/environment
  • Create GitHub issue

Last Updated: 2024