[asterisk-commits] mjordan: testsuite/asterisk/trunk r4862 - in /asterisk/trunk/tests/apps/bridg...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Mar 18 11:51:00 CDT 2014
Author: mjordan
Date: Tue Mar 18 11:50:52 2014
New Revision: 4862
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4862
Log:
bridge_wait: Add test bridge_wait_roles to test BridgeWait channel roles
This test places a local channel with role "participant" into the holding
bridge. The other end enters the BackgroundDetect application. A second
local channel enters the holding bridge as an announcer. Audio is then
streamed from the announcer channel. The participant channel in the
BackgroundDetect application should be able to pick up on this audio, raise a
UserEvent, and pass the test if audio was detected. The announcer channel
will then hang up and end the scenario.
Review: https://reviewboard.asterisk.org/r/3315/
(closes issue ASTERISK-23356)
Reported by: Matt Jordan
patches:
bridge_wait_roles_diff uploaded by bford (license 6580)
Added:
asterisk/trunk/tests/apps/bridge/bridge_wait/
asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_roles/
asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_roles/configs/
asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_roles/configs/ast1/
asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_roles/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_roles/test-config.yaml (with props)
asterisk/trunk/tests/apps/bridge/bridge_wait/tests.yaml (with props)
Modified:
asterisk/trunk/tests/apps/bridge/tests.yaml
Added: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_roles/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_roles/configs/ast1/extensions.conf?view=auto&rev=4862
==============================================================================
--- asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_roles/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_roles/configs/ast1/extensions.conf Tue Mar 18 11:50:52 2014
@@ -1,0 +1,54 @@
+; Test to see if the roles in BridgeWait work as intended
+
+[default]
+
+; ----------------------------------------------------------------------
+; ***Required***
+; ----------------------------------------------------------------------
+[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)
+
+; ------------------------------------------------------------
+; Used to place the other end of the local channel into the
+; BackgroundDetect application.
+; ------------------------------------------------------------
+exten => detect,1,NoOp()
+ same => n,Set(TALK_DETECTED=0)
+ same => n,BackgroundDetect(tt-monkeys,2,100,200,20000)
+ same => n,ExecIf($[${TALK_DETECTED}=0]?UserEvent(TestResult,result:fail):UserEvent(TestResult,result:pass))
+ same => n,Hangup()
+
+; ------------------------------------------------------------
+; The two channels that will enter the holding bridge.
+; ------------------------------------------------------------
+exten => participant,1,NoOp()
+ same => n,Answer()
+ same => n,BridgeWait(somebridge,participant,e(s))
+ same => n,Hangup()
+
+exten => announcer,1,NoOp()
+ same => n,Answer()
+ same => n,BridgeWait(somebridge,announcer)
+ same => n,Hangup()
Propchange: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_roles/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_roles/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_roles/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_roles/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_roles/test-config.yaml?view=auto&rev=4862
==============================================================================
--- asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_roles/test-config.yaml (added)
+++ asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_roles/test-config.yaml Tue Mar 18 11:50:52 2014
@@ -1,0 +1,113 @@
+test-info:
+ summary: 'Tests that the BridgeWait roles are working correctly.'
+ description:
+ This test has a local channel join a holding bridge with role participant and
+ silence as the entertainment. The other end of the Local channel should enter
+ the background detect application. A second local channel should then join the
+ holding bridge with role announcer, and should play an audio file once in the
+ bridge. The end of the participant channel running background detect should
+ realize a sound is being played back to it, and pass the test if it does. The
+ other channel will then hang up and end the scenario.
+
+test-modules:
+ test-object:
+ config-section: test-object-config
+ typename: 'apptest.AppTest'
+
+test-object-config:
+ app: 'BridgeWait'
+ scenarios:
+ -
+ # Scenario 1
+ # Goes through the steps in the description above.
+ channels:
+ -
+ channel-id: 'Participant'
+ channel-name: 'Local/participant at default'
+ context: 'default'
+ exten: 'detect'
+ start-on-create: True
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'BridgeEnter'
+ BridgeTechnology: 'holding_bridge'
+ BridgeName: 'somebridge'
+ Channel: 'Local/participant at default-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Participant channel entered bridge'
+ -
+ action-type: 'start-call'
+ channel-id: 'Announcer'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'TestResult'
+ Result: 'pass'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Sound detected in recording'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'Hangup'
+ Channel: 'Local/participant at default-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Participant channel hung up'
+ -
+ channel-id: 'Announcer'
+ channel-name: 'Local/announcer at default'
+ context: 'default'
+ exten: 'wait'
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'BridgeEnter'
+ BridgeTechnology: 'holding_bridge'
+ BridgeName: 'somebridge'
+ Channel: 'Local/announcer at default-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Announcer channel entered bridge'
+ -
+ action-type: 'stream-audio'
+ sound-file: 'vm-intro'
+ -
+ action-type: 'hangup'
+ delay: 6
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'Hangup'
+ Channel: 'Local/announcer at default-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Announcer channel hung up'
+ -
+ action-type: 'end-scenario'
+
+properties:
+ minversion: '12.0.0'
+ dependencies:
+ - python : 'twisted'
+ - python : 'starpy'
+ - asterisk : 'app_userevent'
+ - asterisk : 'app_bridgewait'
+ tags:
+ - apps
+ - bridge
Propchange: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_roles/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_roles/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_roles/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: 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=auto&rev=4862
==============================================================================
--- asterisk/trunk/tests/apps/bridge/bridge_wait/tests.yaml (added)
+++ asterisk/trunk/tests/apps/bridge/bridge_wait/tests.yaml Tue Mar 18 11:50:52 2014
@@ -1,0 +1,3 @@
+# Enter tests here in the order they should be considered for execution:
+tests:
+ - test: 'bridge_wait_roles'
Propchange: asterisk/trunk/tests/apps/bridge/bridge_wait/tests.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/apps/bridge/bridge_wait/tests.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/apps/bridge/bridge_wait/tests.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
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=4862&r1=4861&r2=4862
==============================================================================
--- asterisk/trunk/tests/apps/bridge/tests.yaml (original)
+++ asterisk/trunk/tests/apps/bridge/tests.yaml Tue Mar 18 11:50:52 2014
@@ -2,3 +2,4 @@
tests:
- test: 'bridge_baseline'
- test: 'bridge_transfer_callee'
+ - dir: 'bridge_wait'
More information about the asterisk-commits
mailing list