Automated Audio Testing Bernard Rodrigue Software Developer, - - PowerPoint PPT Presentation

automated audio testing
SMART_READER_LITE
LIVE PREVIEW

Automated Audio Testing Bernard Rodrigue Software Developer, - - PowerPoint PPT Presentation

Automated Audio Testing Bernard Rodrigue Software Developer, Audiokinetic Agenda History of Audio Testing Optimizing human interventions RoboQA in details Other forms of testing Your game and tools History Designer Test


slide-1
SLIDE 1

Automated Audio Testing

Bernard Rodrigue Software Developer, Audiokinetic

slide-2
SLIDE 2

Agenda

  • History of Audio Testing
  • Optimizing human interventions
  • RoboQA in details
  • Other forms of testing
  • Your game and tools
slide-3
SLIDE 3

History

slide-4
SLIDE 4

Designer (Authoring) Test Applications Game Audio Engine Platform Audio

slide-5
SLIDE 5

Manual Testing

  • Audio Engine code needs to be tested
  • Interactive testing
  • In game
  • In test applications
  • In designer tools
  • Human ears
slide-6
SLIDE 6

Issues with this Strategy

  • Hard to structure
  • Depends on human ears
  • Repetitive and error prone
  • Very low test coverage
  • No quality metrics
slide-7
SLIDE 7

Designer (Wwise) Test Applications Game Audio Engine Platform Audio Script Engine

slide-8
SLIDE 8

Defining Test Scenarios

  • Scripts library
  • First quality metrics
  • Listen to the script output
  • Have expectations of what to hear
  • Approve the audio or not
  • Run on a many platforms
slide-9
SLIDE 9

Issues with this Strategy

  • Depends on human ears
  • Can not detect subtle issues
  • Long and repetitive process (weeks!)
  • Easy to get distracted and overlook issues
  • The tests are not run often enough
  • The tester becomes insane
slide-10
SLIDE 10

A New Era

+

slide-11
SLIDE 11

Audio Testing Goals

Minimize dependency on human ears Minimize human interventions Catch regression issues early Increase test coverage Maintain high quality builds

slide-12
SLIDE 12

Key Elements

  • Solid script library
  • Record and compare the audio output
  • Process the audio in offline vs. real-time
  • Record 1 minute in 5 seconds
  • Multiple platforms/configurations
  • Daily
slide-13
SLIDE 13

PS3 PS3 PS3 PS3

The Automated System

Script

iOS

WAV files

Window s Xbox360

Audio Data

Platforms Test

slide-14
SLIDE 14

Daily Sequence

Daily Build

Prepare Tests

Build Test Data

Convert Audio

Build Machine Test Server Target Platform Execute Test

Copy test input Copy test

  • utput

Process results

slide-15
SLIDE 15

Evaluating the Test Results

Output is analyzed

User Accepts?

Reference is updated

Test is executed Output == Reference

End

yes

no

Investigation

Issue Fixed no

yes

slide-16
SLIDE 16

Report - Front End

slide-17
SLIDE 17

Also in the report

  • Error return values
  • Crashes
  • Asserts
  • Execution issues
  • Network and System failures
slide-18
SLIDE 18

Focusing on Important Details

  • Very important
  • New differences
  • New Asserts and Crashes
  • Less important
  • System or execution failures
  • Not important
  • Known issues
  • Success
slide-19
SLIDE 19

Diff Application

slide-20
SLIDE 20

Diff Tool

Daily Test Output Reference Diff

slide-21
SLIDE 21

Measure Tools

Peak:-7.4 dB 0.522s, 8350 samples Peak:-12.7 dB 0.522s, 8350 samples

5.388s 86204 samples 16000Hz 16 bit 1.0

slide-22
SLIDE 22

Compare Across Platforms

PS3 Wii Win32 Xbox360 x64

slide-23
SLIDE 23

Diff Algorithm

[] Diff( a[], b[] ) { for i = 0; i < min(a.count, b.count) diff[i] = a[i] – b[i]; return diff; }

slide-24
SLIDE 24

Lua Scripts

slide-25
SLIDE 25

Lua Programming Language

  • Lua
  • Simple – Light - Powerful
  • Easy type conversion (Coercion)
  • Garbage collection
  • Advanced Lua
  • Use closures to define dynamic functions
  • Use tables to define test data
slide-26
SLIDE 26

Script Example

slide-27
SLIDE 27

Script Wrapping

slide-28
SLIDE 28

A Great Deal of Data

slide-29
SLIDE 29

Multiplication of data

  • Over 200 test scripts
  • Over 5000 test functions
  • 10 platforms
  • Debug, Profile, Release
  • 5.1 and Stereo
  • 300 000 combinations!

x86/x64/vc9/vc10 Xbox360 PS3 Wii WiiU 3DS Vita Android Mac iOS

slide-30
SLIDE 30

Disk space

  • 350 GB of wav files
  • 150 hours of audio (6 days+)
  • Select configuration/platform per test
  • 90 000 reference wav files
  • Keep tests short!
slide-31
SLIDE 31

Output Hashing

  • Do not transfer 350 GB on network!
  • Avoid sending redundant information
  • While executing a test:
  • Hash the wav data
  • Only transfer if different from reference
  • Save bandwidth
  • Save time
slide-32
SLIDE 32

Other issues

slide-33
SLIDE 33

Handling constant randomness

  • Tests must always sound the same
  • Set the seed to a constant value
  • Same random sequence every time
slide-34
SLIDE 34

Non-audible differences

  • Some differences are non audible
  • Automatically accept -90dB
  • Run peak level analysis on the difference
  • Focus on serious issues
slide-35
SLIDE 35

Other forms of testing

slide-36
SLIDE 36

Performance Testing

  • Run suite of benchmark scenarios
  • Use the profiling services to calculate CPU

usage

  • Run in real-time (not offline)
  • Run on all platforms
  • Compare performance over time
slide-37
SLIDE 37

Performance scenarios

  • Examples:
  • Playing 32 vorbis voices from memory
  • Running 64 EQ plugin simultaneously
  • Run the scenario a couple of times
  • Store the mean and variance
slide-38
SLIDE 38

Stress Testing

  • Cover the 10% non tested
  • Test the memory allocation failures
  • Random null pointer on alloc()
  • Run at repetition
  • No output recording
  • No constant random seed
  • Catch any crash
slide-39
SLIDE 39

What is Next?

slide-40
SLIDE 40

Code coverage

  • Improve test metrics
  • How much code has been tested?
  • Use a code coverage tool
  • Identify non-tested code
slide-41
SLIDE 41

Future improvements

  • Better integration with bug tracker
  • Collect crash dumps
  • Detect audio glitches
  • Save Profiler output
slide-42
SLIDE 42

Applying this to your game

  • Audio tools
  • Effects or sources plug-in
  • Complex audio structures
  • Guns
  • Cars
  • Any audio code
slide-43
SLIDE 43

Game walk-through recording

  • Build a script while playing the game
  • Replay the script every day
  • Record the audio
  • Seed the random with constant value
slide-44
SLIDE 44

Game Simulator

  • Check out:
  • Wwise Game Simulator
  • AkLuaFramework.lua
  • StartOutputCapture()
  • Test!
slide-45
SLIDE 45

Question?