[asterisk-bugs] [Asterisk 0016809]: [patch] Design functionality test for dialplan pattern matching

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Feb 12 11:49:09 CST 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16809 
====================================================================== 
Reported By:                lmadsen
Assigned To:                mmichelson
====================================================================== 
Project:                    Asterisk
Issue ID:                   16809
Category:                   Tests/NewFeature
Reproducibility:            N/A
Severity:                   feature
Priority:                   normal
Status:                     assigned
Asterisk Version:           SVN 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-02-11 07:26 CST
Last Modified:              2010-02-12 11:49 CST
====================================================================== 
Summary:                    [patch] Design functionality test for dialplan
pattern matching
Description: 
Since we've had a couple of dialplan matching problems before in the past,
I'd like to try and create a set of tests that run through a set of complex
conditions, make sure they get the correct output (i.e. utilize the right
pattern match).

This is based from an email that Jared had sent. I know he'll have a lot
of examples to provide for this test!
====================================================================== 

---------------------------------------------------------------------- 
 (0118037) mmichelson (administrator) - 2010-02-12 11:49
 https://issues.asterisk.org/view.php?id=16809#c118037 
---------------------------------------------------------------------- 
I've added a new diff that allows you to muck with priorities when
registering new test extensions. Now, instead of registering a single
priority, you can register multiple ones, numbered how you please, up to 10
per extension. When searching for a specific pattern, you can specify a
priority to find as well.

I also doxygenified the structures in the file.

jsmith, the example you gave above is something that definitely needs to
be tested, but it falls out of the scope of this particular test. All this
test can (and should) do is to say "I want exten 300, priority 1" and we
make sure that in the example above that the exten "_3XX" at priority 1 is
returned. 

I'm less concerned in this test with the sequence of events that occurs
when a particular extension is called. So cases like the ones you've posted
where the CID changes in mid operation, or any use of Goto is not testable
with what I have written.

Like I've said though, such things do need to be tested, they just fall
outside the scope of a strict pattern matching unit test.

The next step for expanding the functionality of this test will be to have
the ability for multiple contexts, including the ability to include one
context within another. I'll update this issue once I've got that written.
With that in place, the next step will be to write a bunch of good test
cases. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-02-12 11:49 mmichelson     Note Added: 0118037                          
======================================================================




More information about the asterisk-bugs mailing list