RELEASE 2 MILESTONE 1 TEST PLAN
===============================

3. Functional Test Plan
-----------------------

Work through the following checklist, adding the date the test passed
and your initials and comments on the tests if required.

R2M1 Functional Tests
---------------------

=========================================
Section: Station to Station
Desc:    Tests call functionality between 
         stations
Depends: none
Affects: none
========================================

   [X] station->station
      [X] pick up, dial this extension, get busy
          + DR 7/8/03, OK but had to mod station.pl so that dialling this
            extension didnt take us to VM.  While not technically
            wrong this made passing this basic test before testing VM
            difficult so behaviour was changed to busy tone when
            dialling this ext  
      [X] pick up, dial invalid extension, get busy
          + DR 7/8/03
      [X] pick up, dial valid ext, hang up before answer
          + DR 7/8/03
      [X] pick up, dial valid ext, regular call, A hangup
          + DR 7/8/03
      [X] pick up, dial valid ext, regular call, B hangup
          + DR 7/8/03
      [X] pick up, flash, make sure nothing happens
          + DR 7/8/03, dial tone stops but apart from that works OK,
	    handles hang up (back to idle) and dialling (makes call)
            OK after flash

      [X] pick up, dial one digit (instead of 3), hangup
          + DR 10/8/03 fail, didnt get dial tone back on next pickup
	    - added event loop to better handle collecting multiple
              digits and exceptions
	  + DR 10/8/03 now passed OK
      
      [X] pick up A, dial one digit (instead of 3), pick up B, dial A
         (all three digits), complete dialling at A
         + B should busy out
         + B dialling A shouldnt interfere with A
           - DR 10/8/03 fail, above conditiosn caused dialling on A to
             busy out.  
	   - DR 10/0/03 pass, Added event loop to better handle, now OK              

=========================================
Section: Trunk to Station
Desc:    Tests call functionality from a 
         trunks to a stations
Depends: none
Affects: none
========================================

   [X] trunk->station
      + converted back to old, non AA code for now to get
        R2M1 out the door
      [X] ring trunk a few times, dont answer station
          + DR 8/8/03
      [X] ring trunk a few times, answer station
          + DR 8/8/03
      [X] ring trunk with first station busy, dont answer
         + assumes trunk map with two stations 
	 + make sure second station rings
         + DR 10/8/03
      [X] ring trunk with first station busy, answer
         + assumes trunk map with two stations 
         + DR 10/8/03
      [X] ring trunk with both stations busy
         + dont answer, check it wraps around to first stations      
         + un-busy one station after a few rings, mae sure it starts
           ringing
         + DR 10/8/03, passed

=========================================
Section: Station to Trunk
Desc:    Tests call functionality from a 
         station to a trunk
Depends: none
Affects: none
========================================

   [X] station->trunk
      [X] pick up, dial 0, hangup
         + DR 8/8/03, failed:
           - got stuck in a state playing tones, waiting for second
             hangup          
           - didnt get external dial tone when hit 0, just silence
         + DR 8/8/03, passed
           - converted back to old non-lcr dialing code 
 
      [X] check making external call
         [X] press 0, dial external number, answer
         + DR 8/8/03, failed:
           + 10s time to make call after dialling is different from other PBXes
           + "#" is different from other PBXes, why should we have 
             to do extra?
           + hearing DTMFs dialling is different to other PBXes
         + DR 8/8/03 passed
           - converted back to old non-lcr dialing code for now
         [X] test hangup from both sides, make sure back to idle
         [X] test voice quality
           + DR 10/8/03 passed
           + rang 8445 1015 thru Hindley St PBX, sounded great,
             perhaps slightly low level
           + sidetone level great, not sure why, but sounds great
	   + S/N 19, V0.1, homework P700, Leader 720 phone, dialled
             out thru ext 106
           + should test more thorogoughly to see if sidetone comes back

      [X] check running out of external lines
         + use test000.conf with only one ext line
         + pick up 1 station, dial 0
         + pick up second station, dial 0
         [X] see if we get busy signal on second station
            + DR 8/8/03, got busy eventually, after whole dialling
              process, similar behaiviour to hindley PBX, waits for
              whole number before giving u busy, not just request for
              external line

=========================================
Section: Hold flash transfer
Desc:    Tests hook flash, hold and
         transfer functionalities
Depends: none
Affects: none
========================================

   [X] flash
      + stat-stat call
      + stat flash, flash again, call resumes
      + test several times on both sides	      
      + DR 8/8/03, passed OK, lots of flashes on both sides

   [X] hold->off hold
      + pick up, dial valid ext, statA-statB call
      [X] flash A, A dial trunk, A hangup, Trunk + statB call, B hangup
      + DR 10/8/03, failed due to bug detecting two trunks
      + DR 10/8/03, passed when fixed above bug 

   [X] hold->transfers
      + this test require 3 stations, plus a trunk
      + start with station A dialling B
      [X] but b on hold, b hangs up
         + DR 11/8/03 pass
      [X] put b on hold, dial c, c busy, flash to get back to b, put c
         back on hook
         + DR 11/8/03 pass
      [X] put b on hold, dial c, no answer on c (still ringing), flash to get back to b
         + DR 11/8/03 pass
      [X] put b on hold, dial invalid ext, should get busy
         + DR 11/8/03 pass
      [X] put b on hold, dial ext line, if no ext lines get busy, flash
          to get b back
         + DR 11/8/03 pass
      [X] a-b call, a puts b on hold, a makes call to c, c puts a on hold, then flashes
         to get a back
         + DR 11/8/03 pass
      [X] hit flash while we are on hold - nothing should happen
         + DR 11/8/03 pass
      [X] put b on hold, call c, hangup c, a-b reconnected
         + DR 11/8/03 fail, we werent rebridging after c hangup
         + DR 11/8/03 pass, after fixed code
      [X] trunk call a, flash a, dial b, pick up b, c hangup, a flash,
          should get dialtone
          + DR 11/8/03 pass, after initial fail
      [X] trunk calls a, flash a, dial b, pick up b, trunk hangup, a flash,
         should get dialtone
	 + DR 11/8/03, pass but room for improvement
         + works OK on Hindley St PBX, as loop drop causes hangup
         + might need mods for .au PSTN, e.g. hangup tone detect
         + otherwise we have 5 min time out to rely on
         + also cat 2 prob if far end hangs up trunk while not in
           hold, but fixes itself after 5 mins of after stat hang up
         + Pass, but room for improvement, maybe detect LD in handle
           call state, after initial transient has passed (after first
           ping maybe)      

   [X] external flashing
      [] make A->trunk call on Hindley St (HS) PBX
      + hit flash-# 
      + check that we get HS dial tone
      + dial another HS ext
      + see if call goes thru OK
      + DR 14/8/03 OK
      [X] generate flash while not in a call (pickup, #)
	 + DR 14/8/03 OK, # makes it go thru to dialling, can get out
           of it OK
      [X] generate flash while in a stat-stat call
         + flash, #
	 + DR 14/8/03 OK, # makes dial tone stop, but can flash to get
	   other station back

   [X] music on hold
      + test000.conf has two moh files set up
      + one is actually a prompt
      [X] check it cycles thru at least 2 moh files OK     
         + some initial bugs with undefined MOH array values 
	 + but fixed them
	 + DR 14/8/03 OK
      [X] #-out both moh files from conf file
         + check it doesnt do anything crazy, no error messages
	 + should just have silence
	 + DR 14/8/03 OK

4. Performance testing
----------------------

   + fully automated tests
   + we use scripts to simulate phones and phone lines
   + leave running for some time   
   + each script used must run for 1000 iterations to PASS
  
   [x] test001: inbound calls, single trunk and station
      + BK passed 11/08/03 1000+ calls
   [x] test002: outbound calls, single trunk and station
      + BK passed 12/08/03 1125+ calls
   [x] test003: station-station calls, 2 station scripts
      + BK passed 12/08/03 1370+ calls
   [x] test004: transfers, 1T, 2S, T->S1, then S1->S2, ..... 
      + BK passed 12/08/03 1000+ calls
   [x] test005: test001 with audio path testing
      + simulated line plays DTMFs
      + simulated phone detetcs DTMFs to determine validity of audio
        path
      + record pass/fail stats
      + BK passed 13/8/03 1000+ calls
	      calls answered: 1005 All digits collected: 1005
   [x] test006: test001 with audio path testing
      + simulated line plays 30 second tone
      + simulated phone records tone and analyses with tonetrain
      + record pass/fail stats
      + save dud wave files to a dud directory, enumerate file names
      + BK passed 14/8/03 1300+ calls
   [] test007: load test, all 12 ports active {2 machines}
      + pass is 24 hrs running with no lock ups
      + check computational load, average and spikes
      + way to test audio path
      + passed 28/4/03 72 hours without lockup
        Removed callgen machine from pbxmachine and plugged in handsets to
        confirm that every thing was working. Examined the logs and there
        where only slight issues with the tests them selves.
      + BK passed 21/8/03
          Test7A: calls answered: 6201 All digits collected: 6200
          Test7B: calls answered and transferred: 6187 b timeouts: 4
          Test7C: calls made 10231  calls answered: 10231
          Test7D: calls made: 11255
          Test7E: calls answered and transferred: 4708 b timeouts: 3
