[asterisk-commits] mjordan: testsuite/asterisk/trunk r4866 - in /asterisk/trunk/tests/apps/confb...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Mar 18 12:30:00 CDT 2014


Author: mjordan
Date: Tue Mar 18 12:29:53 2014
New Revision: 4866

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4866
Log:
confbridge: Add test for end marked users

This test verifies that when a waitmarked user, an endmarked user, and a
waitmarked/endmarked user all join a conference, they wait for the marked
user. When the marked user joins, all these users should be able to interact
with each other. Once the marked user leaves, every user with the 'endmarked'
tag is removed from the conference. The waitmarked user returns to its
waiting state, listening to music on hold.

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

ASTERISK-23302 #close
ASTERISK-23302 #comment patch conf-endmarked-diff uploaded by bford (license 6580)

(closes issue ASTERISK-23302)
Reported by: Matt Jordan
patches:
  conf-endmarked-diff uploaded by bford (license 6580)


Added:
    asterisk/trunk/tests/apps/confbridge/confbridge_end_marked/
    asterisk/trunk/tests/apps/confbridge/confbridge_end_marked/configs/
    asterisk/trunk/tests/apps/confbridge/confbridge_end_marked/configs/ast1/
    asterisk/trunk/tests/apps/confbridge/confbridge_end_marked/configs/ast1/confbridge.conf   (with props)
    asterisk/trunk/tests/apps/confbridge/confbridge_end_marked/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/apps/confbridge/confbridge_end_marked/test-config.yaml   (with props)
Modified:
    asterisk/trunk/tests/apps/confbridge/tests.yaml

Added: asterisk/trunk/tests/apps/confbridge/confbridge_end_marked/configs/ast1/confbridge.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_end_marked/configs/ast1/confbridge.conf?view=auto&rev=4866
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_end_marked/configs/ast1/confbridge.conf (added)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_end_marked/configs/ast1/confbridge.conf Tue Mar 18 12:29:53 2014
@@ -1,0 +1,24 @@
+[general]
+
+[waitmarked_profile]
+type = user
+wait_marked = yes
+music_on_hold_when_empty = yes
+
+[waitmarked_endmarked_profile]
+type = user
+wait_marked = yes
+end_marked = yes
+music_on_hold_when_empty = yes
+
+[marked_profile]
+type = user
+marked = yes
+
+[endmarked_profile]
+type = user
+end_marked = yes
+music_on_hold_when_empty = yes
+
+[default_bridge]
+type = bridge

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_end_marked/configs/ast1/confbridge.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_end_marked/configs/ast1/confbridge.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_end_marked/configs/ast1/confbridge.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/confbridge/confbridge_end_marked/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_end_marked/configs/ast1/extensions.conf?view=auto&rev=4866
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_end_marked/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_end_marked/configs/ast1/extensions.conf Tue Mar 18 12:29:53 2014
@@ -1,0 +1,50 @@
+; Confbridge test involving waitmarked, marked, and endmarked users
+
+; ----------------------------------------------------------------------
+; ***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)
+
+; ----------------------------------------------------------------------
+; Puts users in the confbridge.
+; ----------------------------------------------------------------------
+[confbridge]
+
+exten => waitmarked-user,1,NoOp()
+    same => n,ConfBridge(1,,waitmarked_profile)
+    same => n,Hangup()
+
+exten => marked-user,1,NoOp()
+    same => n,ConfBridge(1,,marked_profile)
+    same => n,Hangup()
+
+exten => endmarked-user,1,NoOp()
+    same => n,ConfBridge(1,,endmarked_profile)
+    same => n,Hangup()
+
+exten => waitmarked-endmarked-user,1,NoOp()
+    same => n,ConfBridge(1,,waitmarked_endmarked_profile)
+    same => n,Hangup()

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_end_marked/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_end_marked/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/confbridge/confbridge_end_marked/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_end_marked/test-config.yaml?view=auto&rev=4866
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_end_marked/test-config.yaml (added)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_end_marked/test-config.yaml Tue Mar 18 12:29:53 2014
@@ -1,0 +1,351 @@
+testinfo:
+    summary: 'Tests interactions between waitmarked, marked, and endmarked users.'
+    description:
+        This test verifies that when a waitmarked, an endmarked, and a waitmarked
+        endmarked user all join a Conference, they all wait for the marked user to
+        join. They should all be able to interact with each other once the marked
+        user joins. When the marked user leaves, all users with the endmarked
+        tag should be removed from the Conference. The waitmarked user should return
+        to its waiting state.
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'apptest.AppTest'
+
+test-object-config:
+  app: 'ConfBridge'
+  scenarios:
+    -
+      # Scenario 1
+      # A waitmarked user, an endmarked user, and an endmarked/waitmarked user all
+      # join a Conference and should hear music on hold while they wait for the marked
+      # user to join. Once the marked user joins, each user should be able to interact
+      # with each other. When the marked user leaves, every user with the endmarked
+      # tag should be removed from the Conference, and the waitmarked user should
+      # return to its waiting state.
+      events:
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'ConfbridgeStart'
+              Conference: '1'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference Started'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'TestEvent'
+              State: 'CONF_CHANGE_STATE'
+              OldState: 'EMPTY'
+              NewState: 'INACTIVE'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference transitioned from EMPTY to INACTIVE'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'TestEvent'
+              State: 'CONF_CHANGE_STATE'
+              OldState: 'INACTIVE'
+              NewState: 'SINGLE'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference transitioned from INACTIVE to SINGLE'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'TestEvent'
+              State: 'CONF_CHANGE_STATE'
+              OldState: 'SINGLE'
+              NewState: 'MULTI_MARKED'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference transitioned from SINGLE to MULTI_MARKED'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'TestEvent'
+              State: 'CONF_CHANGE_STATE'
+              OldState: 'MULTI_MARKED'
+              NewState: 'SINGLE'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference transitioned from MULTI_MARKED to SINGLE'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'TestEvent'
+              State: 'CONF_CHANGE_STATE'
+              OldState: 'SINGLE'
+              NewState: 'INACTIVE'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference transitioned from SINGLE to INACTIVE'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'TestEvent'
+              State: 'CONF_CHANGE_STATE'
+              OldState: 'INACTIVE'
+              NewState: 'EMPTY'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference transitioned from INACTIVE to EMPTY'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'ConfbridgeEnd'
+              Conference: '1'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              delay: 2
+              expected-result: 'Conference Ended'
+            -
+              action-type: 'end-scenario'
+      channels:
+        -
+          channel-id: 'Waitmarked-user'
+          channel-name: 'Local/waitmarked-user at confbridge'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: True
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeJoin'
+                  Conference: '1'
+                  Channel: 'Local/waitmarked-user at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Waitmarked user joined Conference'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeLeave'
+                  Conference: '1'
+                  Channel: 'Local/waitmarked-user at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Waitmarked user left Conference'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'MusicOnHoldStart'
+                  Channel: 'Local/waitmarked-user at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Waitmarked user is hearing MusicOnHold'
+                -
+                  action-type: 'start-call'
+                  delay: 1
+                  channel-id: 'Endmarked-user'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'MusicOnHoldStop'
+                  Channel: 'Local/waitmarked-user at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'MusicOnHold stopped for waitmarked user'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'TestEvent'
+                  State: 'PLAYBACK'
+                  Channel: 'Local/waitmarked-user at confbridge-.*'
+                  Message: 'conf-waitforleader'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Waitmarked user heard conf-waitforleader.'
+        -
+          channel-id: 'Endmarked-user'
+          channel-name: 'Local/endmarked-user at confbridge'
+          context: 'default'
+          exten: 'wait'
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeJoin'
+                  Conference: '1'
+                  Channel: 'Local/endmarked-user at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Endmarked user joined Conference'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeLeave'
+                  Conference: '1'
+                  Channel: 'Local/endmarked-user at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Endmarked user left Conference'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'MusicOnHoldStart'
+                  Channel: 'Local/endmarked-user at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Endmarked user is hearing MusicOnHold'
+                -
+                  action-type: 'start-call'
+                  delay: 1
+                  channel-id: 'Waitmarked-endmarked-user'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'MusicOnHoldStop'
+                  Channel: 'Local/endmarked-user at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'MusicOnHold stopped for endmarked user'
+        -
+          channel-id: 'Waitmarked-endmarked-user'
+          channel-name: 'Local/waitmarked-endmarked-user at confbridge'
+          context: 'default'
+          exten: 'wait'
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeJoin'
+                  Conference: '1'
+                  Channel: 'Local/waitmarked-endmarked-user at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Waitmarked-endmarked user joined Conference'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeLeave'
+                  Conference: '1'
+                  Channel: 'Local/waitmarked-endmarked-user at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Waitmarked-endmarked user left Conference'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'MusicOnHoldStart'
+                  Channel: 'Local/waitmarked-endmarked-user at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Waitmarked-endmarked user is hearing MusicOnHold'
+                -
+                  action-type: 'start-call'
+                  delay: 1
+                  channel-id: 'Marked-user'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'MusicOnHoldStop'
+                  Channel: 'Local/waitmarked-endmarked-user at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'MusicOnHold stopped for waitmarked-endmarked user'
+        -
+          channel-id: 'Marked-user'
+          channel-name: 'Local/marked-user at confbridge'
+          context: 'default'
+          exten: 'wait'
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeJoin'
+                  Conference: '1'
+                  Channel: 'Local/marked-user at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Marked-endmarked user joined Conference'
+                -
+                  action-type: 'hangup'
+                  delay: 1
+                -
+                  action-type: 'hangup'
+                  delay: 5
+                  channel-id: 'Waitmarked-user'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeLeave'
+                  Conference: '1'
+                  Channel: 'Local/marked-user at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Marked user left Conference'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'TestEvent'
+                  State: 'PLAYBACK'
+                  Channel: 'Local/marked-user at confbridge-.*'
+                  Message: 'confbridge-join'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Marked user heard confbridge-join'
+
+properties:
+    minversion: '12.0.0'
+    tags:
+      - confbridge
+      - apps
+    dependencies:
+      - buildoption: 'TEST_FRAMEWORK'
+      - python : 'twisted'
+      - python : 'starpy'
+      - asterisk : 'app_confbridge'
+      - asterisk : 'app_playback'

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_end_marked/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_end_marked/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_end_marked/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: asterisk/trunk/tests/apps/confbridge/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/tests.yaml?view=diff&rev=4866&r1=4865&r2=4866
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/tests.yaml (original)
+++ asterisk/trunk/tests/apps/confbridge/tests.yaml Tue Mar 18 12:29:53 2014
@@ -11,3 +11,5 @@
     - test: 'confbridge_dynamic_menus'
     - test: 'confbridge_result'
     - test: 'confbridge_triple_lindy'
+    - test: 'confbridge_end_marked'
+




More information about the asterisk-commits mailing list