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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Mar 8 11:54:53 CST 2014


Author: mjordan
Date: Sat Mar  8 11:54:43 2014
New Revision: 4816

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4816
Log:
tests/apps/confbridge: Test for two waitmarked users in a conference

This patch adds a test for two waitmarked users joining a conference together.

While incredibly boring, it does check that both users will be perpetually
bored together.

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

(closes issue ASTERISK-23298)
Reported by: Matt Jordan
patches:
  rb3309 uploaded by bford (license 6580)

ASTERISK-23298 #resolve #close #comment rb3309 uploaded by bford (license 6580)

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

Added: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_only/configs/ast1/confbridge.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_only/configs/ast1/confbridge.conf?view=auto&rev=4816
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_only/configs/ast1/confbridge.conf (added)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_only/configs/ast1/confbridge.conf Sat Mar  8 11:54:43 2014
@@ -1,0 +1,9 @@
+[general]
+
+[waitmarked_profile]
+type = user
+wait_marked = yes
+music_on_hold_when_empty = yes
+
+[default_bridge]
+type = bridge

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

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

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

Added: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_only/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_only/configs/ast1/extensions.conf?view=auto&rev=4816
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_only/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_only/configs/ast1/extensions.conf Sat Mar  8 11:54:43 2014
@@ -1,0 +1,42 @@
+; Confbridge test for waitmarked users only
+
+; ----------------------------------------------------------------------
+; ***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-one,1,NoOp()
+    same => n,ConfBridge(1,,waitmarked_profile)
+    same => n,Hangup()
+
+exten => waitmarked-two,1,NoOp()
+    same => n,ConfBridge(1,,waitmarked_profile)
+    same => n,Hangup()

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

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

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

Added: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_only/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_only/test-config.yaml?view=auto&rev=4816
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_only/test-config.yaml (added)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_only/test-config.yaml Sat Mar  8 11:54:43 2014
@@ -1,0 +1,208 @@
+testinfo:
+    summary: 'Test two waitmarked users in a Conference'
+    description:
+        This tests checks that when a waitmarked user joins a Conference, MusicOnHold
+        is played to that user, and when another waitmarked user joins the Conference,
+        the MusicOnHold should continue to play for the previous user as well as the
+        new user. No marked users or users of any other kind will join the Conference.
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'apptest.AppTest'
+
+test-object-config:
+  app: 'ConfBridge'
+  scenarios:
+    -
+      # Scenario 1
+      # Two waitmarked users join a Conference. Both should hear music on hold,
+      # and should continue to hear it for the duration of the test. If either
+      # user stops hearing it when the other joins/leaves, the test should fail.
+      # No marked users will join, and the test will pass if both waitmarked users
+      # sit in the Conference for a duration without music on hold stopping.
+      # Both users will then hang up and the scenario will end.
+      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'
+            -
+              action-type: 'start-call'
+              delay: 3
+              channel-id: 'Waitmarked2'
+        -
+          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'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'TestEvent'
+              State: 'CONF_CHANGE_STATE'
+              NewState: 'MULTI_MARKED'
+          actions:
+            -
+              action-type: 'fail-test'
+              message: 'Conference started with no marked users'
+      channels:
+        -
+          channel-id: 'Waitmarked1'
+          channel-name: 'Local/waitmarked-one at confbridge'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: True
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeJoin'
+                  Conference: '1'
+                  Channel: 'Local/waitmarked-one at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Waitmarked1 joined Conference'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeLeave'
+                  Conference: '1'
+                  Channel: 'Local/waitmarked-one at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Waitmarked1 left Conference'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'MusicOnHoldStart'
+                  Channel: 'Local/waitmarked-one at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'MusicOnHold started for waitmarked1'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'TestEvent'
+                  State: 'PLAYBACK'
+                  Channel: 'Local/waitmarked-one at confbridge-.*'
+                  Message: 'conf-waitforleader'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Waitmarked1 heard conf-waitforleader.'
+        -
+          channel-id: 'Waitmarked2'
+          channel-name: 'Local/waitmarked-two at confbridge'
+          context: 'default'
+          exten: 'wait'
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeJoin'
+                  Conference: '1'
+                  Channel: 'Local/waitmarked-two at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Waitmarked2 joined Conference'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeLeave'
+                  Conference: '1'
+                  Channel: 'Local/waitmarked-two at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Waitmarked2 left Conference'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'MusicOnHoldStart'
+                  Channel: 'Local/waitmarked-two at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'MusicOnHold started for waitmarked2'
+                -
+                  action-type: 'hangup'
+                  delay: 3
+                  channel-id: 'Waitmarked1'
+                -
+                  action-type: 'hangup'
+                  channel-id: 'Waitmarked2'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'TestEvent'
+                  State: 'PLAYBACK'
+                  Channel: 'Local/waitmarked-two at confbridge-.*'
+                  Message: 'conf-waitforleader'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Waitmarked2 heard conf-waitforleader.'
+
+properties:
+    minversion: '11.8.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_waitmarked_only/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_only/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=4816&r1=4815&r2=4816
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/tests.yaml (original)
+++ asterisk/trunk/tests/apps/confbridge/tests.yaml Sat Mar  8 11:54:43 2014
@@ -3,6 +3,7 @@
     - test: 'confbridge_marked_unmarked'
     - test: 'confbridge_marked'
     - test: 'confbridge_waitmarked_single'
+    - test: 'confbridge_waitmarked_only'
     - test: 'confbridge_waitmarked_kick'
     - test: 'confbridge_nominal'
     - test: 'confbridge_recording'




More information about the asterisk-commits mailing list