[svn-commits] mjordan: testsuite/asterisk/trunk r4872 - in /asterisk/trunk/tests/apps/bridg...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Mar 18 13:48:09 CDT 2014


Author: mjordan
Date: Tue Mar 18 13:48:02 2014
New Revision: 4872

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4872
Log:
bridge/bridge_wait: Add a test for the BridgeWait application's e option.

This test verifies that the various ways to entertain a holding bridge receive
the correct events, and ultimately work properly. The tests cover the
following:
1) e(m) = This option is tested by verifying that the participant in the
          holding bridge receives MoH events.
2) m(class) = This scenario tests that not only are the MoH events received,
              but also that the specified class is used.
3) e(n) = This scenario calls for a fail-test action-type if either a Hold
          event or MoH event were to show up. This does the basic amount of
          verification possible that 'no entertainment' is used.
4) e(s) = This scenario was basically identical to e(n), only the participant
          receives silent audio instead of no sound at all.
5) e(r) = This scenario verifies that the channel state changed to ringing
          through checking a Newstate event.
6) e(h) = This scenario puts the participant on hold. Since the hold is not
          originated from a channel driver, the MoH events are checked.

(closes issue ASTERISK-23355)
Reported by: Matt Jordan
patches:
  bridge_wait_e_options_diff uploaded by jemidy (license 6581)

ASTERISK-23355 #close
ASTERISK-23355 #comment bridge_wait_e_options_diff submitted by jemidy (license 6581)

Review: https://reviewboard.asterisk.org/r/3330/

Added:
    asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/
    asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/configs/
    asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/configs/ast1/
    asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/configs/ast1/musiconhold.conf   (with props)
    asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/test-config.yaml   (with props)
Modified:
    asterisk/trunk/tests/apps/bridge/bridge_wait/tests.yaml
    asterisk/trunk/tests/apps/bridge/tests.yaml

Added: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/configs/ast1/extensions.conf?view=auto&rev=4872
==============================================================================
--- asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/configs/ast1/extensions.conf Tue Mar 18 13:48:02 2014
@@ -1,0 +1,45 @@
+[holding_bridge]
+
+exten => em_option,1,NoOp()
+     same => n,BridgeWait(default,participant,e(m))
+
+exten => m_option,1,NoOp()
+     same => n,BridgeWait(default,participant,m(default))
+
+exten => en_option,1,NoOp()
+     same => n,BridgeWait(default,participant,e(n))
+
+exten => es_option,1,NoOp()
+     same => n,BridgeWait(default,participant,e(s))
+
+exten => er_option,1,NoOp()
+     same => n,BridgeWait(default,participant,e(r))
+
+exten => eh_option,1,NoOp()
+     same => n,BridgeWait(default,participant,e(h))
+
+[default]
+
+exten => sendDTMF,1,NoOp()
+	same => n,Verbose(1, Sending DTMF Signal ${DTMF_TO_SEND})
+	same => n,SendDTMF(${DTMF_TO_SEND})
+	same => n,Goto(default,wait,1)
+
+exten => sendAudio,1,NoOp()
+	same => n,Verbose(1, Sending audio file ${TALK_AUDIO})
+	same => n,Playback(${TALK_AUDIO})
+	same => n,Goto(default,wait,1)
+
+exten => sendAudioWithDTMF,1,NoOp()
+	same => n,Verbose(1, Sending audio file ${TALK_AUDIO})
+	same => n,Playback(${TALK_AUDIO})
+	same => n,Verbose(1, Sending DTMF Signal ${DTMF_TO_SEND})
+	same => n,SendDTMF(${DTMF_TO_SEND})
+	same => n,Goto(default,wait,1)
+
+exten => hangup,1,NoOp()
+	same => n,Verbose(1, Hanging up)
+	same => n,Hangup()
+
+exten => wait,1,NoOp()
+	same => n,Wait(10000)

Propchange: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/configs/ast1/musiconhold.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/configs/ast1/musiconhold.conf?view=auto&rev=4872
==============================================================================
--- asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/configs/ast1/musiconhold.conf (added)
+++ asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/configs/ast1/musiconhold.conf Tue Mar 18 13:48:02 2014
@@ -1,0 +1,6 @@
+[general]
+
+[default]
+
+mode=files
+directory=moh

Propchange: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/configs/ast1/musiconhold.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/configs/ast1/musiconhold.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/configs/ast1/musiconhold.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/test-config.yaml?view=auto&rev=4872
==============================================================================
--- asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/test-config.yaml (added)
+++ asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/test-config.yaml Tue Mar 18 13:48:02 2014
@@ -1,0 +1,297 @@
+testinfo:
+    summary: 'Tests the e options of the BridgeWait application'
+    description: |
+        'This test covers all the ways that a channel can be entertained within
+         a holding bridge. It tests the e(m), m(), e(n), e(s), e(r), and e(h).
+         The e(m) deals with playing music while on hold, m() is specifically to check
+         that MoH is playing to the participant, e(n) is to have no entertainment
+         in the Bridge, e(s) is to have silence within the Bridge, e(r) is to have
+         the holding Bridge ring without a pause and e(h) is to have a channel put
+         on hold.'
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'apptest.AppTest'
+
+test-object-config:
+  app: 'BridgeWait'
+  scenarios:
+    -
+      # Scenario 1: This test is to verify that the MoH is started using the
+      # the default MoH class through the e(m) operation.
+      channels:
+        -
+          channel-id: 'EM_Option'
+          channel-name: 'Local/em_option at holding_bridge'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: True
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'Hangup'
+                  Channel: 'Local/em_option at holding_bridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Channel Hung Up'
+                -
+                  action-type: 'end-scenario'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'MusicOnHoldStart'
+                  Channel: 'Local/em_option at holding_bridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'MusicOnHold Event was Received'
+                -
+                  action-type: 'hangup'
+                  delay: 1
+    -
+      # Scenario 2: This test verifies that the m option can be assigned a MoH
+      # class, and that it gets those MoH events.
+      channels:
+        -
+          channel-id: 'M_Option'
+          channel-name: 'Local/m_option at holding_bridge'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: True
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'Hangup'
+                  Channel: 'Local/m_option at holding_bridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Channel Hung Up'
+                -
+                  action-type: 'end-scenario'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'MusicOnHoldStart'
+                  Channel: 'Local/m_option at holding_bridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'MusicOnHold Event was Received'
+                -
+                  action-type: 'hangup'
+                  delay: 1
+    -
+      # Scenario 3: The e(n) test checks to make sure that no MoH or Hold events
+      # are present within the test since there should be no entertainment.
+      channels:
+        -
+          channel-id: 'EN_Option'
+          channel-name: 'Local/en_option at holding_bridge'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: True
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'BridgeEnter'
+                  Channel: 'Local/en_option at holding_bridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'BridgeEnter Event Received'
+                -
+                  action-type: 'hangup'
+                  delay: 2
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'MusicOnHoldStart'
+                  Channel: 'Local/en_option at holding_bridge-.*'
+              actions:
+                -
+                  action-type: 'fail-test'
+                  message: 'MusicOnHold Started!'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'Hold'
+                  Channel: 'Local/en_option at holding_bridge-.*'
+              actions:
+                -
+                  action-type: 'fail-test'
+                  message: 'Hold Found!'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'Hangup'
+                  Channel: 'Local/en_option at holding_bridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Channel Hung Up'
+                -
+                  action-type: 'end-scenario'
+    -
+      # Scenario 4: The e(s) test is identical to the e(n) test, yet it plays back
+      # silent audio instead of dead air. It also checks that no Hold or MoH Events
+      # were received.
+      channels:
+        -
+          channel-id: 'ES_Option'
+          channel-name: 'Local/es_option at holding_bridge'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: True
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'BridgeEnter'
+                  Channel: 'Local/es_option at holding_bridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'BridgeEnter Event Received'
+                -
+                  action-type: 'hangup'
+                  delay: 2
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'MusicOnHoldStart'
+                  Channel: 'Local/es_option at holding_bridge-.*'
+              actions:
+                -
+                  action-type: 'fail-test'
+                  message: 'MusicOnHold Started!'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'Hold'
+                  Channel: 'Local/es_option at holding_bridge-.*'
+              actions:
+                -
+                  action-type: 'fail-test'
+                  message: 'Hold Found!'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'Hangup'
+                  Channel: 'Local/es_option at holding_bridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Channel Hung Up'
+                -
+                  action-type: 'end-scenario'
+    -
+      # Scenario 5: The e(r) test verifies that the state of the channel changes
+      # to ringing by checking a Newstate event.
+      channels:
+        -
+          channel-id: 'ER_Option'
+          channel-name: 'Local/er_option at holding_bridge'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: True
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'Newstate'
+                  Channel: 'Local/er_option at holding_bridge-.*'
+                  ChannelStateDesc: 'Ringing'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Channel is Ringing'
+                -
+                  action-type: 'hangup'
+                  delay: 3
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'Hangup'
+                  Channel: 'Local/er_option at holding_bridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Channel Hung Up'
+                -
+                  action-type: 'end-scenario'
+    -
+      # Scenario 6: The e(h) test checks to make sure that the channel is on
+      # hold through MoH events.
+      channels:
+        -
+          channel-id: 'EH_Option'
+          channel-name: 'Local/eh_option at holding_bridge'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: True
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'BridgeEnter'
+                  Channel: 'Local/eh_option at holding_bridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'BridgeEnter Event Received'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'MusicOnHoldStart'
+                  Channel: 'Local/eh_option at holding_bridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Channel on Hold'
+                -
+                  action-type: 'hangup'
+                  delay: 2
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'Hangup'
+                  Channel: 'Local/eh_option at holding_bridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Channel Hung Up'
+                -
+                  action-type: 'end-scenario'
+
+properties:
+    minversion: '12.0.0'
+    tags:
+      - bridge
+    dependencies:
+      - buildoption: 'TEST_FRAMEWORK'
+      - python: 'twisted'
+      - python: 'starpy'
+      - asterisk: 'app_bridgewait'

Propchange: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_e_options/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: asterisk/trunk/tests/apps/bridge/bridge_wait/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/bridge/bridge_wait/tests.yaml?view=diff&rev=4872&r1=4871&r2=4872
==============================================================================
--- asterisk/trunk/tests/apps/bridge/bridge_wait/tests.yaml (original)
+++ asterisk/trunk/tests/apps/bridge/bridge_wait/tests.yaml Tue Mar 18 13:48:02 2014
@@ -1,3 +1,4 @@
 # Enter tests here in the order they should be considered for execution:
 tests:
+    - test: 'bridge_wait_e_options'
     - test: 'bridge_wait_roles'

Modified: asterisk/trunk/tests/apps/bridge/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/bridge/tests.yaml?view=diff&rev=4872&r1=4871&r2=4872
==============================================================================
--- asterisk/trunk/tests/apps/bridge/tests.yaml (original)
+++ asterisk/trunk/tests/apps/bridge/tests.yaml Tue Mar 18 13:48:02 2014
@@ -3,3 +3,4 @@
     - test: 'bridge_baseline'
     - test: 'bridge_transfer_callee'
     - dir: 'bridge_wait'
+




More information about the svn-commits mailing list