Discussion:
[asterisk-dev] [Code Review] 3329: AGI Exit Status Test
Benjamin Keith Ford
2014-03-11 19:54:43 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3329/
-----------------------------------------------------------

Review request for Asterisk Developers.


Bugs: ASTERISK-19167
https://issues.asterisk.org/jira/browse/ASTERISK-19167


Repository: testsuite


Description
-------

Notes:
- Is a sub-task of ASTERISK-19167
- Ignore userA directory; will be removed from repository

This test runs through a few different AGI scripts to verify that AGISTATUS returns the correct values:
1. Attempts to run an AGI script that does not exist. AGISTATUS returns NOTFOUND.
2. Attempts to run an AGI script that has an invalid path. AGISTATUS returns FAILURE.
3. Attempts to run an AGI script that has a non-executable interpreter. AGISTATUS returns FAILURE.
4. Attempts to run an AGI script that is non-executable. AGISTATUS returns FAILURE.
5. Runs an AGI script that will be hung up on while waiting for a command. AGISTATUS returns HANGUP.
6. Runs an AGI script that will be hung up on while executing a command. AGISTATUS returns HANGUP.
7. Runs an AGI script that exits normally. AGISTATUS returns SUCCESS.


Diffs
-----

./asterisk/trunk/tests/agi/exit_status/waiting.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/test-config.yaml 4749
./asterisk/trunk/tests/agi/exit_status/run-test 4749
./asterisk/trunk/tests/agi/exit_status/executing.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/donothing.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/configs/ast1/extensions.conf PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter3.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter2.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter.agi PRE-CREATION

Diff: https://reviewboard.asterisk.org/r/3329/diff/


Testing
-------


Thanks,

Benjamin Keith Ford
Mark Michelson
2014-03-13 23:13:05 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3329/#review11196
-----------------------------------------------------------


One thing I notice about this test is that it is structured to call the first extension, then when that finishes, call the second, then when that finishes, call the third, etc.

Since no call depends on any of the previous call results, I think this test could be changed to originate all the calls at the same time and evaluate the UserEvents and Hangups as they arrive. This would have a few benefits:

1) The test will execute more quickly
2) You can get rid of the can_call member of your test class.
3) Your AMI hangup handler will be simplified greatly since you won't need to have a big if-else ladder to figure out what to do next. In fact, you may be able to just get rid of it altogether.

Doing it this way kind of screws up your detected member, though. As a simple workaround, in your new_exten_event_handler, you can determine whether to send the AMI hangup by checking event['AppData'] for the name of the AGI script. If event['AppData'] is 'waiting.agi' or 'executing.agi' then you issue the AMI hangup.


./asterisk/trunk/tests/agi/exit_status/configs/ast1/extensions.conf
<https://reviewboard.asterisk.org/r/3329/#comment20835>

I recommend sending a UserEvent if the AGISTATUS is not what is expected. Something like the following:

same => n,UserEvent(TestResult,result:${IF($[${AGISTATUS}=NOTFOUND]?pass:fail)})

Since your test script prints a message when the result is not "pass", making this alteration can help to more easily debug which test cases are misbehaving.



./asterisk/trunk/tests/agi/exit_status/run-test
<https://reviewboard.asterisk.org/r/3329/#comment20833>

This sentence is incomplete.



./asterisk/trunk/tests/agi/exit_status/run-test
<https://reviewboard.asterisk.org/r/3329/#comment20839>

Even though I'm advocating to just get rid of this member altogether, I think it's worth mentioning that the name could be improved. Since this is intended to indicated that the testsuite is supposed to interrupt the current AGI, something like "interrupt_agi" would probably be more clear.



./asterisk/trunk/tests/agi/exit_status/run-test
<https://reviewboard.asterisk.org/r/3329/#comment20837>

Change the else to explicitly check if event['context'] == 'executing-extens'

Add a final else clause that logs an error if an unexpected extension ends up calling the userevent from the h extension. Structure this so that success_count does not get incremented if this final else case is executed.



./asterisk/trunk/tests/agi/exit_status/run-test
<https://reviewboard.asterisk.org/r/3329/#comment20836>

Use %d since self.success_count is an integer.



./asterisk/trunk/tests/agi/exit_status/run-test
<https://reviewboard.asterisk.org/r/3329/#comment20838>

This use of 7 here is what is sometimes referred to as a "magic number" in programming, and it's not really a good thing. If this test were to be altered later to test some more situations or to remove some test cases, then whoever made the modifications would have to go through the source and change all of the 7's to 8's or 6's or whatever.

Instead, at the top of the file, declare a global variable, something like:

EXPECTED_SUCCESSES = 7

Then, everywhere where you are currently comparing to 7, just compare to EXPECTED_SUCCESSES instead.

In addition to the code maintainability I mentioned earlier, it also is more expressive; readers of the code will easily understand that you are comparing to the number of expected successes rather than a number they have to figure out the significance of.

In general, prefer symbolic names for things over bare numerals. Obviously, as with every rule, there are exceptions to this.



./asterisk/trunk/tests/agi/exit_status/run-test
<https://reviewboard.asterisk.org/r/3329/#comment20834>

Change this to an error instead of info, and print the value of test.success_count.


- Mark Michelson
Post by Benjamin Keith Ford
-----------------------------------------------------------
https://reviewboard.asterisk.org/r/3329/
-----------------------------------------------------------
(Updated March 11, 2014, 7:54 p.m.)
Review request for Asterisk Developers.
Bugs: ASTERISK-19167
https://issues.asterisk.org/jira/browse/ASTERISK-19167
Repository: testsuite
Description
-------
- Is a sub-task of ASTERISK-19167
- Ignore userA directory; will be removed from repository
1. Attempts to run an AGI script that does not exist. AGISTATUS returns NOTFOUND.
2. Attempts to run an AGI script that has an invalid path. AGISTATUS returns FAILURE.
3. Attempts to run an AGI script that has a non-executable interpreter. AGISTATUS returns FAILURE.
4. Attempts to run an AGI script that is non-executable. AGISTATUS returns FAILURE.
5. Runs an AGI script that will be hung up on while waiting for a command. AGISTATUS returns HANGUP.
6. Runs an AGI script that will be hung up on while executing a command. AGISTATUS returns HANGUP.
7. Runs an AGI script that exits normally. AGISTATUS returns SUCCESS.
Diffs
-----
./asterisk/trunk/tests/agi/exit_status/waiting.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/test-config.yaml 4749
./asterisk/trunk/tests/agi/exit_status/run-test 4749
./asterisk/trunk/tests/agi/exit_status/executing.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/donothing.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/configs/ast1/extensions.conf PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter3.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter2.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter.agi PRE-CREATION
Diff: https://reviewboard.asterisk.org/r/3329/diff/
Testing
-------
Thanks,
Benjamin Keith Ford
rmudgett
2014-03-14 00:47:33 UTC
Permalink
Post by Benjamin Keith Ford
Post by Mark Michelson
One thing I notice about this test is that it is structured to call the first extension, then when that finishes, call the second, then when that finishes, call the third, etc.
1) The test will execute more quickly
2) You can get rid of the can_call member of your test class.
3) Your AMI hangup handler will be simplified greatly since you won't need to have a big if-else ladder to figure out what to do next. In fact, you may be able to just get rid of it altogether.
Doing it this way kind of screws up your detected member, though. As a simple workaround, in your new_exten_event_handler, you can determine whether to send the AMI hangup by checking event['AppData'] for the name of the AGI script. If event['AppData'] is 'waiting.agi' or 'executing.agi' then you issue the AMI hangup.
Doing tests serially allows them to be debugged easier. Having all the tests run simultaneously makes it difficult to figure out which event is a result of which test. This is especially true if unexpected events happen that are a clue to what is going wrong.


- rmudgett


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3329/#review11196
-----------------------------------------------------------
Post by Benjamin Keith Ford
-----------------------------------------------------------
https://reviewboard.asterisk.org/r/3329/
-----------------------------------------------------------
(Updated March 11, 2014, 2:54 p.m.)
Review request for Asterisk Developers.
Bugs: ASTERISK-19167
https://issues.asterisk.org/jira/browse/ASTERISK-19167
Repository: testsuite
Description
-------
- Is a sub-task of ASTERISK-19167
- Ignore userA directory; will be removed from repository
1. Attempts to run an AGI script that does not exist. AGISTATUS returns NOTFOUND.
2. Attempts to run an AGI script that has an invalid path. AGISTATUS returns FAILURE.
3. Attempts to run an AGI script that has a non-executable interpreter. AGISTATUS returns FAILURE.
4. Attempts to run an AGI script that is non-executable. AGISTATUS returns FAILURE.
5. Runs an AGI script that will be hung up on while waiting for a command. AGISTATUS returns HANGUP.
6. Runs an AGI script that will be hung up on while executing a command. AGISTATUS returns HANGUP.
7. Runs an AGI script that exits normally. AGISTATUS returns SUCCESS.
Diffs
-----
./asterisk/trunk/tests/agi/exit_status/waiting.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/test-config.yaml 4749
./asterisk/trunk/tests/agi/exit_status/run-test 4749
./asterisk/trunk/tests/agi/exit_status/executing.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/donothing.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/configs/ast1/extensions.conf PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter3.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter2.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter.agi PRE-CREATION
Diff: https://reviewboard.asterisk.org/r/3329/diff/
Testing
-------
Thanks,
Benjamin Keith Ford
Mark Michelson
2014-03-14 14:02:35 UTC
Permalink
Post by rmudgett
Post by Mark Michelson
One thing I notice about this test is that it is structured to call the first extension, then when that finishes, call the second, then when that finishes, call the third, etc.
1) The test will execute more quickly
2) You can get rid of the can_call member of your test class.
3) Your AMI hangup handler will be simplified greatly since you won't need to have a big if-else ladder to figure out what to do next. In fact, you may be able to just get rid of it altogether.
Doing it this way kind of screws up your detected member, though. As a simple workaround, in your new_exten_event_handler, you can determine whether to send the AMI hangup by checking event['AppData'] for the name of the AGI script. If event['AppData'] is 'waiting.agi' or 'executing.agi' then you issue the AMI hangup.
Doing tests serially allows them to be debugged easier. Having all the tests run simultaneously makes it difficult to figure out which event is a result of which test. This is especially true if unexpected events happen that are a clue to what is going wrong.
It's only difficult to debug if the test does a poor job of documenting what it has done and what went wrong. AMI events, especially in 12, give detailed information in them, and so you should have the necessary tools to be able to print out exactly what the failure was ("For this case, I was expecting this but I got that instead").

I agree that in the early stages of testing, running test cases individually is a good idea to be sure that each one operates as you expect, but once you've determined that your individual test cases are working, then if the test cases do not interact with each other, then parallelization is the way to go.


- Mark


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3329/#review11196
-----------------------------------------------------------
Post by rmudgett
-----------------------------------------------------------
https://reviewboard.asterisk.org/r/3329/
-----------------------------------------------------------
(Updated March 11, 2014, 7:54 p.m.)
Review request for Asterisk Developers.
Bugs: ASTERISK-19167
https://issues.asterisk.org/jira/browse/ASTERISK-19167
Repository: testsuite
Description
-------
- Is a sub-task of ASTERISK-19167
- Ignore userA directory; will be removed from repository
1. Attempts to run an AGI script that does not exist. AGISTATUS returns NOTFOUND.
2. Attempts to run an AGI script that has an invalid path. AGISTATUS returns FAILURE.
3. Attempts to run an AGI script that has a non-executable interpreter. AGISTATUS returns FAILURE.
4. Attempts to run an AGI script that is non-executable. AGISTATUS returns FAILURE.
5. Runs an AGI script that will be hung up on while waiting for a command. AGISTATUS returns HANGUP.
6. Runs an AGI script that will be hung up on while executing a command. AGISTATUS returns HANGUP.
7. Runs an AGI script that exits normally. AGISTATUS returns SUCCESS.
Diffs
-----
./asterisk/trunk/tests/agi/exit_status/waiting.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/test-config.yaml 4749
./asterisk/trunk/tests/agi/exit_status/run-test 4749
./asterisk/trunk/tests/agi/exit_status/executing.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/donothing.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/configs/ast1/extensions.conf PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter3.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter2.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter.agi PRE-CREATION
Diff: https://reviewboard.asterisk.org/r/3329/diff/
Testing
-------
Thanks,
Benjamin Keith Ford
Benjamin Keith Ford
2014-03-14 14:43:09 UTC
Permalink
Post by rmudgett
Post by Mark Michelson
One thing I notice about this test is that it is structured to call the first extension, then when that finishes, call the second, then when that finishes, call the third, etc.
1) The test will execute more quickly
2) You can get rid of the can_call member of your test class.
3) Your AMI hangup handler will be simplified greatly since you won't need to have a big if-else ladder to figure out what to do next. In fact, you may be able to just get rid of it altogether.
Doing it this way kind of screws up your detected member, though. As a simple workaround, in your new_exten_event_handler, you can determine whether to send the AMI hangup by checking event['AppData'] for the name of the AGI script. If event['AppData'] is 'waiting.agi' or 'executing.agi' then you issue the AMI hangup.
Doing tests serially allows them to be debugged easier. Having all the tests run simultaneously makes it difficult to figure out which event is a result of which test. This is especially true if unexpected events happen that are a clue to what is going wrong.
It's only difficult to debug if the test does a poor job of documenting what it has done and what went wrong. AMI events, especially in 12, give detailed information in them, and so you should have the necessary tools to be able to print out exactly what the failure was ("For this case, I was expecting this but I got that instead").
I agree that in the early stages of testing, running test cases individually is a good idea to be sure that each one operates as you expect, but once you've determined that your individual test cases are working, then if the test cases do not interact with each other, then parallelization is the way to go.
Having this test originate all channels simultaneously would make things a little more difficult to debug as Richard was saying, because of ASTERISK-23390. The AGI application event shows up twice currently, one time when calling the script, and another time when the script is finished running / not found / etc. This is why I have the variable "detected" in there currently, and if I ran everything at the same time, I would need two of these variables instead of one, to make sure that I only hangup these channels once. Otherwise all the "No such channel" errors pop up. I could make the change now, and have two variables, and that would potentially make it easier to make the entire change once the bug is fixed. Suggestions?


- Benjamin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3329/#review11196
-----------------------------------------------------------
Post by rmudgett
-----------------------------------------------------------
https://reviewboard.asterisk.org/r/3329/
-----------------------------------------------------------
(Updated March 14, 2014, 2:43 p.m.)
Review request for Asterisk Developers.
Bugs: ASTERISK-19167
https://issues.asterisk.org/jira/browse/ASTERISK-19167
Repository: testsuite
Description
-------
- Is a sub-task of ASTERISK-19167
- Ignore userA directory; will be removed from repository
1. Attempts to run an AGI script that does not exist. AGISTATUS returns NOTFOUND.
2. Attempts to run an AGI script that has an invalid path. AGISTATUS returns FAILURE.
3. Attempts to run an AGI script that has a non-executable interpreter. AGISTATUS returns FAILURE.
4. Attempts to run an AGI script that is non-executable. AGISTATUS returns FAILURE.
5. Runs an AGI script that will be hung up on while waiting for a command. AGISTATUS returns HANGUP.
6. Runs an AGI script that will be hung up on while executing a command. AGISTATUS returns HANGUP.
7. Runs an AGI script that exits normally. AGISTATUS returns SUCCESS.
Diffs
-----
./asterisk/trunk/tests/agi/exit_status/waiting.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/test-config.yaml 4749
./asterisk/trunk/tests/agi/exit_status/run-test 4749
./asterisk/trunk/tests/agi/exit_status/executing.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/donothing.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/configs/ast1/extensions.conf PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter3.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter2.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter.agi PRE-CREATION
Diff: https://reviewboard.asterisk.org/r/3329/diff/
Testing
-------
Thanks,
Benjamin Keith Ford
Benjamin Keith Ford
2014-03-14 14:43:04 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3329/
-----------------------------------------------------------

(Updated March 14, 2014, 2:43 p.m.)


Review request for Asterisk Developers.


Changes
-------

- Added a result:fail for UserEvents
- Fixed grammar errors
- Changed "detected" variable to "interrupt_agi"
- Updated some if/else statements
- Fixed syntax errors
- Added a constant EXPECTED_SUCCESSES to be easily modified if the test needs to be updated
- Added an expected versus actual success count if the test failed


Bugs: ASTERISK-19167
https://issues.asterisk.org/jira/browse/ASTERISK-19167


Repository: testsuite


Description
-------

Notes:
- Is a sub-task of ASTERISK-19167
- Ignore userA directory; will be removed from repository

This test runs through a few different AGI scripts to verify that AGISTATUS returns the correct values:
1. Attempts to run an AGI script that does not exist. AGISTATUS returns NOTFOUND.
2. Attempts to run an AGI script that has an invalid path. AGISTATUS returns FAILURE.
3. Attempts to run an AGI script that has a non-executable interpreter. AGISTATUS returns FAILURE.
4. Attempts to run an AGI script that is non-executable. AGISTATUS returns FAILURE.
5. Runs an AGI script that will be hung up on while waiting for a command. AGISTATUS returns HANGUP.
6. Runs an AGI script that will be hung up on while executing a command. AGISTATUS returns HANGUP.
7. Runs an AGI script that exits normally. AGISTATUS returns SUCCESS.


Diffs (updated)
-----

./asterisk/trunk/tests/agi/exit_status/waiting.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/test-config.yaml 4749
./asterisk/trunk/tests/agi/exit_status/run-test 4749
./asterisk/trunk/tests/agi/exit_status/executing.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/donothing.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/configs/ast1/extensions.conf PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter3.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter2.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter.agi PRE-CREATION

Diff: https://reviewboard.asterisk.org/r/3329/diff/


Testing
-------


Thanks,

Benjamin Keith Ford
opticron
2014-03-20 13:58:58 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3329/#review11294
-----------------------------------------------------------



./asterisk/trunk/tests/agi/exit_status/run-test
<https://reviewboard.asterisk.org/r/3329/#comment20934>

Invert this test so you can return early and then drop the indentation of the remainder of the function.



./asterisk/trunk/tests/agi/exit_status/run-test
<https://reviewboard.asterisk.org/r/3329/#comment20935>

Invert these tests so you can return early and then drop the indentation of the remainder of the function.


- opticron
Post by Benjamin Keith Ford
-----------------------------------------------------------
https://reviewboard.asterisk.org/r/3329/
-----------------------------------------------------------
(Updated March 14, 2014, 9:43 a.m.)
Review request for Asterisk Developers.
Bugs: ASTERISK-19167
https://issues.asterisk.org/jira/browse/ASTERISK-19167
Repository: testsuite
Description
-------
- Is a sub-task of ASTERISK-19167
- Ignore userA directory; will be removed from repository
1. Attempts to run an AGI script that does not exist. AGISTATUS returns NOTFOUND.
2. Attempts to run an AGI script that has an invalid path. AGISTATUS returns FAILURE.
3. Attempts to run an AGI script that has a non-executable interpreter. AGISTATUS returns FAILURE.
4. Attempts to run an AGI script that is non-executable. AGISTATUS returns FAILURE.
5. Runs an AGI script that will be hung up on while waiting for a command. AGISTATUS returns HANGUP.
6. Runs an AGI script that will be hung up on while executing a command. AGISTATUS returns HANGUP.
7. Runs an AGI script that exits normally. AGISTATUS returns SUCCESS.
Diffs
-----
./asterisk/trunk/tests/agi/exit_status/waiting.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/test-config.yaml 4749
./asterisk/trunk/tests/agi/exit_status/run-test 4749
./asterisk/trunk/tests/agi/exit_status/executing.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/donothing.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/configs/ast1/extensions.conf PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter3.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter2.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter.agi PRE-CREATION
Diff: https://reviewboard.asterisk.org/r/3329/diff/
Testing
-------
Thanks,
Benjamin Keith Ford
Benjamin Keith Ford
2014-03-25 15:46:40 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3329/
-----------------------------------------------------------

(Updated March 25, 2014, 3:46 p.m.)


Review request for Asterisk Developers.


Changes
-------

- Cleaned up some Boolean logic to enhance test performance


Bugs: ASTERISK-19167
https://issues.asterisk.org/jira/browse/ASTERISK-19167


Repository: testsuite


Description
-------

Notes:
- Is a sub-task of ASTERISK-19167
- Ignore userA directory; will be removed from repository

This test runs through a few different AGI scripts to verify that AGISTATUS returns the correct values:
1. Attempts to run an AGI script that does not exist. AGISTATUS returns NOTFOUND.
2. Attempts to run an AGI script that has an invalid path. AGISTATUS returns FAILURE.
3. Attempts to run an AGI script that has a non-executable interpreter. AGISTATUS returns FAILURE.
4. Attempts to run an AGI script that is non-executable. AGISTATUS returns FAILURE.
5. Runs an AGI script that will be hung up on while waiting for a command. AGISTATUS returns HANGUP.
6. Runs an AGI script that will be hung up on while executing a command. AGISTATUS returns HANGUP.
7. Runs an AGI script that exits normally. AGISTATUS returns SUCCESS.


Diffs (updated)
-----

./asterisk/trunk/tests/agi/exit_status/waiting.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/test-config.yaml 4749
./asterisk/trunk/tests/agi/exit_status/run-test 4749
./asterisk/trunk/tests/agi/exit_status/executing.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/donothing.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/configs/ast1/extensions.conf PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter3.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter2.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter.agi PRE-CREATION

Diff: https://reviewboard.asterisk.org/r/3329/diff/


Testing
-------


Thanks,

Benjamin Keith Ford
opticron
2014-03-27 15:58:02 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3329/#review11390
-----------------------------------------------------------

Ship it!


Ship It!

- opticron
Post by Benjamin Keith Ford
-----------------------------------------------------------
https://reviewboard.asterisk.org/r/3329/
-----------------------------------------------------------
(Updated March 25, 2014, 10:46 a.m.)
Review request for Asterisk Developers.
Bugs: ASTERISK-19167
https://issues.asterisk.org/jira/browse/ASTERISK-19167
Repository: testsuite
Description
-------
- Is a sub-task of ASTERISK-19167
- Ignore userA directory; will be removed from repository
1. Attempts to run an AGI script that does not exist. AGISTATUS returns NOTFOUND.
2. Attempts to run an AGI script that has an invalid path. AGISTATUS returns FAILURE.
3. Attempts to run an AGI script that has a non-executable interpreter. AGISTATUS returns FAILURE.
4. Attempts to run an AGI script that is non-executable. AGISTATUS returns FAILURE.
5. Runs an AGI script that will be hung up on while waiting for a command. AGISTATUS returns HANGUP.
6. Runs an AGI script that will be hung up on while executing a command. AGISTATUS returns HANGUP.
7. Runs an AGI script that exits normally. AGISTATUS returns SUCCESS.
Diffs
-----
./asterisk/trunk/tests/agi/exit_status/waiting.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/test-config.yaml 4749
./asterisk/trunk/tests/agi/exit_status/run-test 4749
./asterisk/trunk/tests/agi/exit_status/executing.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/donothing.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/configs/ast1/extensions.conf PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter3.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter2.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter.agi PRE-CREATION
Diff: https://reviewboard.asterisk.org/r/3329/diff/
Testing
-------
Thanks,
Benjamin Keith Ford
Benjamin Keith Ford
2014-04-01 15:24:21 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3329/
-----------------------------------------------------------

(Updated April 1, 2014, 10:24 a.m.)


Status
------

This change has been marked as submitted.


Review request for Asterisk Developers.


Changes
-------

Committed in revision 4923


Bugs: ASTERISK-19167
https://issues.asterisk.org/jira/browse/ASTERISK-19167


Repository: testsuite


Description
-------

Notes:
- Is a sub-task of ASTERISK-19167
- Ignore userA directory; will be removed from repository

This test runs through a few different AGI scripts to verify that AGISTATUS returns the correct values:
1. Attempts to run an AGI script that does not exist. AGISTATUS returns NOTFOUND.
2. Attempts to run an AGI script that has an invalid path. AGISTATUS returns FAILURE.
3. Attempts to run an AGI script that has a non-executable interpreter. AGISTATUS returns FAILURE.
4. Attempts to run an AGI script that is non-executable. AGISTATUS returns FAILURE.
5. Runs an AGI script that will be hung up on while waiting for a command. AGISTATUS returns HANGUP.
6. Runs an AGI script that will be hung up on while executing a command. AGISTATUS returns HANGUP.
7. Runs an AGI script that exits normally. AGISTATUS returns SUCCESS.


Diffs
-----

./asterisk/trunk/tests/agi/exit_status/waiting.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/test-config.yaml 4749
./asterisk/trunk/tests/agi/exit_status/run-test 4749
./asterisk/trunk/tests/agi/exit_status/executing.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/donothing.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/configs/ast1/extensions.conf PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter3.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter2.agi PRE-CREATION
./asterisk/trunk/tests/agi/exit_status/badinterpreter.agi PRE-CREATION

Diff: https://reviewboard.asterisk.org/r/3329/diff/


Testing
-------


Thanks,

Benjamin Keith Ford

Loading...