[svn-commits] mjordan: testsuite/asterisk/trunk r2952 - in /asterisk/trunk/tests/apps: ./ c...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Dec 22 14:32:28 CST 2011


Author: mjordan
Date: Thu Dec 22 14:32:24 2011
New Revision: 2952

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=2952
Log:
Add initial ConfBridge tests for Asterisk 10

THis adds a test to cover the nominal execution of the ConfBridge application
in Asterisk 10.  It includes:
1. Multiple user profiles / DTMF menus
2. Use of pins, recording of names, and playback of notifications within the
conference
3. Checking that user profile options are applied

Review: https://reviewboard.asterisk.or/r/1636/

(issue ASTERISK-19059)


Added:
    asterisk/trunk/tests/apps/confbridge/
    asterisk/trunk/tests/apps/confbridge/confbridge_nominal/
    asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/
    asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast1/
    asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast1/confbridge.conf   (with props)
    asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast1/sip.conf   (with props)
    asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast2/
    asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast2/extensions.conf   (with props)
    asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast2/sip.conf   (with props)
    asterisk/trunk/tests/apps/confbridge/confbridge_nominal/run-test   (with props)
    asterisk/trunk/tests/apps/confbridge/confbridge_nominal/test-config.yaml   (with props)
    asterisk/trunk/tests/apps/confbridge/sounds/
    asterisk/trunk/tests/apps/confbridge/sounds/talking.ulaw   (with props)
    asterisk/trunk/tests/apps/confbridge/tests.yaml   (with props)
Modified:
    asterisk/trunk/tests/apps/tests.yaml

Added: asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast1/confbridge.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast1/confbridge.conf?view=auto&rev=2952
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast1/confbridge.conf (added)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast1/confbridge.conf Thu Dec 22 14:32:24 2011
@@ -1,0 +1,39 @@
+[general]
+
+[user_profile]
+type = user
+admin = no
+pin = 1111
+marked = yes
+startmuted = no
+announce_user_count = yes
+announce_user_count_all = 1
+announce_join_leave = yes
+
+[user_menu]
+type = menu
+1 = toggle_mute
+2 = leave_conference
+
+[admin_profile]
+type = user
+admin = yes
+pin = 2222
+marked = yes
+startmuted = yes
+announce_user_count = yes
+announce_user_count_all = 1
+announce_join_leave = yes
+
+[admin_menu]
+type = menu
+1 = toggle_mute
+2 = admin_toggle_conference_lock
+3 = leave_conference
+
+
+[default_bridge]
+type = bridge
+
+[default_user]
+type = user

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

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

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

Added: asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast1/extensions.conf?view=auto&rev=2952
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast1/extensions.conf Thu Dec 22 14:32:24 2011
@@ -1,0 +1,20 @@
+; Confbridge contexts and extensions
+
+[confbridge]
+
+exten => parameterless, 1, NoOp()
+	same => n,ConfBridge(1)
+	same => n,Hangup()
+
+exten => user_profile, 1, NoOp()
+	same => n,ConfBridge(1,,user_profile,user_menu)
+	same => n,UserEvent(TestStatus, status: ConfBridge exit)
+	same => n,Hangup()
+
+exten => admin_profile, 1, NoOp()
+	same => n,ConfBridge(1,,admin_profile,admin_menu)
+	same => n,UserEvent(TestStatus, status: ConfBridge exit)
+	same => n,Hangup()
+
+exten => h,1,NoOp()
+	same => n,UserEvent(TestStatus, status: Hangup exit)

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

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

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

Added: asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast1/sip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast1/sip.conf?view=auto&rev=2952
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast1/sip.conf (added)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast1/sip.conf Thu Dec 22 14:32:24 2011
@@ -1,0 +1,12 @@
+[general]
+bindaddr = 127.0.0.1
+
+[ast2_g722]
+type = friend
+context = confbridge
+fromuser = ast2_g722
+host = 127.0.0.2
+disallow = all
+allow = g722
+qualify = no
+insecure = invite

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

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

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

Added: asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast2/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast2/extensions.conf?view=auto&rev=2952
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast2/extensions.conf (added)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast2/extensions.conf Thu Dec 22 14:32:24 2011
@@ -1,0 +1,27 @@
+; Various extensions that perform actions against the confbridge application
+
+[caller]
+
+exten => sendDTMF,1,NoOp()
+	same => n,Verbose(1, Sending DTMF Signal ${DTMF_TO_SEND})
+	same => n,SendDTMF(${DTMF_TO_SEND})
+	same => n,Goto(caller,wait,1)
+
+exten => sendAudio,1,NoOp()
+	same => n,Verbose(1, Sending audio file ${TALK_AUDIO})
+	same => n,Playback(${TALK_AUDIO})
+	same => n,Goto(caller,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(caller,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/confbridge/confbridge_nominal/configs/ast2/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Added: asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast2/sip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast2/sip.conf?view=auto&rev=2952
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast2/sip.conf (added)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast2/sip.conf Thu Dec 22 14:32:24 2011
@@ -1,0 +1,13 @@
+[general]
+bindaddr = 127.0.0.2
+
+[ast1]
+type = friend
+context = caller
+fromuser = ast1
+host = 127.0.0.1
+disallow = all
+allow = ulaw
+allow = g722
+qualify = no
+insecure = invite

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast2/sip.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast2/sip.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_nominal/configs/ast2/sip.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/confbridge/confbridge_nominal/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_nominal/run-test?view=auto&rev=2952
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_nominal/run-test (added)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_nominal/run-test Thu Dec 22 14:32:24 2011
@@ -1,0 +1,333 @@
+#!/usr/bin/env python
+# vim: sw=3 et:
+'''
+Copyright (C) 2011, Digium, Inc.
+Matt Jordan <mjordan at digium.com>
+
+This program is free software, distributed under the terms of
+the GNU General Public License Version 2.
+'''
+
+import sys
+import os
+import logging
+
+from twisted.internet import reactor
+
+sys.path.append("lib/python")
+
+from asterisk.asterisk import Asterisk
+from asterisk.TestCase import TestCase
+from asterisk.TestState import TestStateController
+from asterisk.TestState import TestState
+from asterisk.TestState import FailureTestState
+from asterisk.confbridge import ConfbridgeTestState
+from asterisk.confbridge import ConfbridgeChannelObject
+
+logger = logging.getLogger(__name__)
+
+
+class StartConfBridgeState(ConfbridgeTestState):
+    """
+    The initial state for the ConfBridge.  This state handles logging in all of the
+    calls to the ConfBridge.  Once all users are in the ConfBridge, it transitions
+    to the ActiveConfBridgeState
+    """
+
+    def __init__(self, controller, testCase, calls):
+        """
+        controller      The TestStateController managing the test
+        testCase        The main test object
+        calls           A dictionary (keyed by conf_bridge_channel ID) of ConfbridgeChannelObjects
+        """
+        ConfbridgeTestState.__init__(self, controller, testCase, calls)
+        self.__bridge_channel = ""
+        self.__joined_channels = 0
+        self.__joined_bridges = 0
+        self.__recorded_names = 0
+        self.__played_names = 0
+
+    def handleStateChange(self, ami, event):
+        state = event['state']
+        channel = ""
+        if 'channel' in event:
+            channel = event['channel']
+            if "Bridge" in channel:
+                self.__bridge_channel = channel
+        if state == 'PLAYBACK' and channel != "":
+            playfile = event['message']
+            if playfile == 'conf-getpin':
+                self.__handle_pin(channel)
+            elif playfile == 'vm-rec-name':
+                self.testCase.expectedEvents['recordname'] = True
+            elif playfile == 'beep':
+                audioFile = os.path.join(os.getcwd(), "tests/apps/confbridge/sounds/talking")
+                self.sendSoundFileWithDTMF(channel, audioFile, "#")
+                self.__recorded_names += 1
+            elif playfile == 'conf-onlyperson':
+                self.testCase.expectedEvents['onlyperson'] = True
+            elif playfile == 'confbridge-join':
+                self.__handle_confbridge_join(channel)
+            elif playfile == 'conf-placeintoconf':
+                self.testCase.expectedEvents['onlypersonplaced'] = True
+            elif 'confbridge-name' in playfile:
+                self.__played_names += 1
+                if (self.__played_names == self.__recorded_names):
+                    self.testCase.expectedEvents['namesplayed'] = True
+
+    def __handle_pin(self, channel):
+        """ Handles a user entering a pin to the ConfBridge """
+        number_to_send = "1111#"
+        if channel in self.calls:
+            if "admin_profile" in self.calls[channel].profile:
+                number_to_send = "2222#"
+                self.testCase.expectedEvents['adminpin'] = True
+            else:
+                self.testCase.expectedEvents['userpin'] = True
+        self.sendDTMF(channel, number_to_send)
+
+    def __handle_confbridge_join(self, channel):
+        """ Handles when the ConfBridge notifies the users that someone has joined """
+
+        """ We'll hear this twice for each channel that joins """
+        if channel == self.__bridge_channel:
+            self.__joined_bridges += 1
+            if (self.__joined_bridges == len(self.calls)):
+                self.testCase.expectedEvents['joinannouncetoall'] = True
+        else:
+            self.__joined_channels += 1
+            if (self.__joined_channels == len(self.calls)):
+                self.testCase.expectedEvents['joinannouncetochannel'] = True
+        if (self.__joined_bridges == len(self.calls) and self.__joined_channels == len(self.calls)):
+            """ Everyone has joined the conference! """
+            self.changeState(ActiveConfBridgeState(self.controller, self.testCase, self.calls))
+
+    def getStateName(self):
+        return "START"
+
+class ActiveConfBridgeState(ConfbridgeTestState):
+    """
+    State when all users are in the ConfBridge.  In this test, after the users
+    are in the conference the admin unmutes themselves, then they and the other
+    marked user leave.  This state tracks that leave notifications are sent, and
+    that the last unmarked user is notified that the leader has left.
+    """
+
+    def __init__(self, controller, testCase, calls):
+        """
+        controller      The TestStateController managing the test
+        testCase        The main test object
+        calls           A dictionary (keyed by conf_bridge_channel ID) of ConfbridgeChannelObjects
+        """
+        ConfbridgeTestState.__init__(self, controller, testCase, calls)
+        self.testCase.reset_timeout()
+        self.__left_notifications = 0
+        self.__admin_channel = ""
+        """
+        Schedule actions to take place.  Since confbridge doesn't process DTMF
+        during an audio file playback, this has to be done now, as opposed to
+        in reaction to an PLAYBACK event (as the PLAYBACK events occur when the stream
+        begins)
+        """
+        self.send_admin_dtmf(5, "1")
+        self.send_user_dtmf(5, "2")
+        self.send_admin_dtmf(10, "3")
+
+    def send_admin_dtmf(self, delay, dtmf_key):
+        for callkey, callObject in self.calls.items():
+            if "admin_profile" in callObject.profile:
+                self.__admin_channel = callkey
+                if delay > 0:
+                    self.scheduleDTMF(delay, callkey, dtmf_key)
+                else:
+                    self.sendDTMF(callkey, dtmf_key)
+
+    def send_user_dtmf(self, delay, dtmf_key):
+        for callkey, callObject in self.calls.items():
+            if "user_profile" in callObject.profile:
+                if delay > 0:
+                    self.scheduleDTMF(delay, callkey, dtmf_key)
+                else:
+                    self.sendDTMF(callkey, dtmf_key)
+
+    def handleStateChange(self, ami, event):
+        state = event['state']
+        channel = ""
+        if 'channel' in event:
+            channel = event['channel']
+        if state == 'CONF_MUTE':
+            if channel == self.__admin_channel and "unmuted" in event['message']:
+                self.testCase.expectedEvents['adminunmuted'] = True
+        elif state == 'PLAYBACK' and channel != "":
+            playfile = event['message']
+            if playfile == 'conf-hasleft':
+                self.__left_notifications += 1
+                if (self.__left_notifications == 2):
+                    self.testCase.expectedEvents['userhasleft'] = True
+            elif playfile == 'conf-leaderhasleft':
+                self.testCase.expectedEvents['leaderhasleft'] = True
+                for callkey, callObject in self.calls.items():
+                    if "parameterless" in callObject.profile:
+                        self.hangup(callkey)
+
+    def getStateName(self):
+        return "ACTIVE"
+
+"""
+The TestCase class that executes the test
+"""
+class ConfBridgeNominal(TestCase):
+
+    asterisk_instances = 2
+
+    def __init__(self):
+        super(ConfBridgeNominal, self).__init__()
+
+        self.reactor_timeout = 30
+        self.create_asterisk(ConfBridgeNominal.asterisk_instances)
+        self.ami_1_originates = ["sip/ast1/parameterless", "sip/ast1/user_profile", "sip/ast1/admin_profile"]
+        self.__amis_connected = 0
+        self.__user_events_confbridge = 0
+        self.__user_events_hangup = 0
+        self.__temp_caller_channel_name = []
+        self.__temp_conf_bridge_channel_name = []
+        self.__temp_caller_ami = []
+        self.__originate = []
+        self.__temp_current_index = 0
+        self.__startObject = None
+        self.expectedEvents = {}
+        self.passed = False
+
+        """ Add the events we expect to receive in order for the test to pass """
+        self.expectedEvents['onlyperson'] = False               # User is told when they are the only person in conference
+        self.expectedEvents['onlypersonplaced'] = False         # User, when only person, is told when they are put into conference
+        self.expectedEvents['userpin'] = False                  # User is prompted for a pin (when configured)
+        self.expectedEvents['adminpin'] = False                 # Admin user is prompted for a pin (when configured)
+        self.expectedEvents['recordname'] = False               # User is prompted to record name (when configured)
+        self.expectedEvents['joinannouncetochannel'] = False    # When bridge is started / user joins, the channel joining is notified
+        self.expectedEvents['joinannouncetoall'] = False        # When bridge is started / user joins, the bridge is notified
+        self.expectedEvents['namesplayed'] = False              # All names recorded are spoken in conference when users join
+        self.expectedEvents['adminunmuted'] = False             # Admin should start off as muted, and toggling the mute should unmute them
+        self.expectedEvents['userhasleft'] = False              # Track that when a user leaves a conference we're notified
+        self.expectedEvents['leaderhasleft'] = False            # Send when the last marked user leaves
+
+    def ami_connect(self, ami):
+        super(ConfBridgeNominal, self).ami_connect(ami)
+
+        self.__amis_connected += 1
+        if (ami.id == 0):
+            ami.registerEvent('UserEvent', self.user_event_handler)
+            ami.registerEvent('Newchannel', self.conf_bridge_new_channel_handler)
+        elif (ami.id == 1):
+            ami.registerEvent('Newchannel', self.caller_new_channel_handler)
+
+        """
+        If all AMI instances have connected, start the state machine that handles the test events
+        and originate the calls
+        """
+        if self.__amis_connected == ConfBridgeNominal.asterisk_instances:
+            self.testStateController = TestStateController(self, self.ami[0])
+            self.__startObject = StartConfBridgeState(self.testStateController, self, {})
+            self.testStateController.changeState(self.__startObject)
+            self.testStateController.addAssertHandler(self.handleAssert)
+
+            """ Originate the calls """
+            self.originate_calls(1, self.ami_1_originates)
+
+    def originate_calls(self, ami_id, originates):
+        for originate in originates:
+            logger.debug("Originating call to %s" % originate)
+            self.__originate.append(originate)
+            df = self.ami[ami_id].originate(originate, "caller", "wait", 1, None, "", None, None, None, {}, False)
+            df.addErrback(self.handleOriginateFailure)
+
+    def handleAssert(self, event):
+        self.passed = False
+        logger.error(" Test Failed - Assert received")
+        logger.error("\t\t AppFunction: " + event['appfunction'])
+        logger.error("\t\t AppLine: " + event['appline'])
+        logger.error("\t\t Expression: " + event['expression'])
+
+        self.stop_reactor()
+
+    def conf_bridge_new_channel_handler(self, ami, event):
+        if not 'channel' in event:
+            return
+        if 'Bridge' in event['channel']:
+            return
+        self.__temp_conf_bridge_channel_name.append(event['channel'])
+        self.check_and_register()
+
+    def caller_new_channel_handler(self, ami, event):
+        if not 'channel' in event:
+            return
+        if 'Bridge' in event['channel']:
+            return
+        self.__temp_caller_channel_name.append(event['channel'])
+        self.__temp_caller_ami.append(ami)
+        self.check_and_register()
+
+    def check_and_register(self):
+        """
+        As we receive NewChannel events back over the AMI connections, we cache them in the temporary lists.  Since
+        these arrive in a non-deterministic fashion and we need to associate them across the Asterisk instances, we
+        wait until all lists have been populated up to the current index, then form a ConfbridgeChannelObject from
+        those items and register it with the initial state object.
+
+        Note that we do make the assumption that we wont receive any two Newchannel events from one Asterisk server
+        out of order with respect to another, i.e., that if we originate call A, and originate call B, we receive
+        them in the order of their originations:
+        AMI 1                   AMI 2
+        NewChan1_1 from A       NewChan2_1 from A
+        NewChan1_2 from B       NewChan2_2 from B
+        """
+        if ((len(self.__temp_caller_channel_name) >= self.__temp_current_index + 1) and (len(self.__temp_conf_bridge_channel_name) >= self.__temp_current_index + 1)):
+            logger.debug("Registering new ConfBridge object: caller channel %s, conf_bridge channel %s, AMI %d (originated to %s)"
+                % (self.__temp_caller_channel_name[self.__temp_current_index],
+                   self.__temp_conf_bridge_channel_name[self.__temp_current_index],
+                   self.__temp_caller_ami[self.__temp_current_index].id,
+                   self.__originate[self.__temp_current_index]))
+            self.__startObject.registerNewCaller(
+                    ConfbridgeChannelObject(
+                        self.__temp_conf_bridge_channel_name[self.__temp_current_index],
+                        self.__temp_caller_channel_name[self.__temp_current_index],
+                        self.__temp_caller_ami[self.__temp_current_index],
+                        self.__originate[self.__temp_current_index]))
+            self.__temp_current_index += 1
+
+    def user_event_handler(self, ami, event):
+        if event['userevent'] != 'TestStatus':
+            return
+        if "ConfBridge" in event['status']:
+            self.__user_events_confbridge += 1
+        if "Hangup" in event['status']:
+            self.__user_events_hangup += 1
+        if (self.__user_events_confbridge == 2 and self.__user_events_hangup == 3):
+            logger.info("Received expected exit messages")
+            self.passed = True
+            self.stop_reactor()
+
+    def run(self):
+        super(ConfBridgeNominal, self).run()
+        self.create_ami_factory(ConfBridgeNominal.asterisk_instances)
+
+
+def main():
+
+    test = ConfBridgeNominal()
+    test.start_asterisk()
+    reactor.run()
+    test.stop_asterisk()
+
+    for event, status in test.expectedEvents.items():
+        if not status:
+            logger.error("Expected event %s failed" % event)
+            test.passed = False
+
+    if not test.passed:
+        return 1
+
+    return 0
+
+if __name__ == "__main__":
+   sys.exit(main() or 0)

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_nominal/run-test
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_nominal/run-test
------------------------------------------------------------------------------
    svn:executable = *

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_nominal/run-test
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_nominal/run-test
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/confbridge/confbridge_nominal/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_nominal/test-config.yaml?view=auto&rev=2952
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_nominal/test-config.yaml (added)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_nominal/test-config.yaml Thu Dec 22 14:32:24 2011
@@ -1,0 +1,17 @@
+testinfo:
+    summary: 'Test nominal operation of app_confbridge'
+    description: |
+        This tests nominal execution of app_confbridge with multiple users entering and
+        participating in a single audio conference.  This includes multiple user profiles and
+        DTMF menus;  admin users; and the interaction of the confbridge with its participants
+        when they join / leave the conference.
+
+properties:
+    minversion: '10'
+    buildoption: 'TEST_FRAMEWORK'
+    dependencies:
+        - python : 'twisted'
+        - python : 'starpy'
+        - asterisk : 'app_confbridge'
+        - asterisk : 'app_senddtmf'
+        - asterisk : 'app_playback'

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

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

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

Added: asterisk/trunk/tests/apps/confbridge/sounds/talking.ulaw
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/sounds/talking.ulaw?view=auto&rev=2952
==============================================================================
Binary file - no diff available.

Propchange: asterisk/trunk/tests/apps/confbridge/sounds/talking.ulaw
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: asterisk/trunk/tests/apps/confbridge/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/tests.yaml?view=auto&rev=2952
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/tests.yaml (added)
+++ asterisk/trunk/tests/apps/confbridge/tests.yaml Thu Dec 22 14:32:24 2011
@@ -1,0 +1,3 @@
+# Enter tests here in the order they should be considered for execution:
+tests:
+    - test: 'confbridge_nominal'

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

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

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

Modified: asterisk/trunk/tests/apps/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/tests.yaml?view=diff&rev=2952&r1=2951&r2=2952
==============================================================================
--- asterisk/trunk/tests/apps/tests.yaml (original)
+++ asterisk/trunk/tests/apps/tests.yaml Thu Dec 22 14:32:24 2011
@@ -5,3 +5,4 @@
     - test: 'directory_attendant_exit'
     - dir: 'voicemail'
     - dir: 'incomplete'
+    - dir: 'confbridge'




More information about the svn-commits mailing list