[asterisk-dev] [Code Review]: SDP Media Attribute Test

Mark Michelson reviewboard at asterisk.org
Tue Jul 10 15:48:19 CDT 2012



> On July 10, 2012, 2:18 p.m., Paul Belanger wrote:
> > /asterisk/trunk/tests/channels/SIP/SDP_attribute_passthrough/run-test, lines 88-92
> > <https://reviewboard.asterisk.org/r/2029/diff/1/?file=29969#file29969line88>
> >
> >     I believe you should be checking test.passed(), something about the TestRunner class.
> >     
> >     To be honest, I might be wrong since I have not tested out the new stuff.
> 
> Joshua Colp wrote:
>     Fixed.

For tests that define their own "main" like this one, the test can use whatever criteria it wants in order to determine a pass/fail result. The TestCase class has a "passed" member for convenience but it's not required to check or manipulate this.

For tests that use the TestRunner (i.e. tests with no run-test file), the test object's (typically a subclass of TestCase) passed value is much more important and is what ultimately determines whether the test passes or fails.


- Mark


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2029/#review6648
-----------------------------------------------------------


On July 10, 2012, 2:30 p.m., Joshua Colp wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2029/
> -----------------------------------------------------------
> 
> (Updated July 10, 2012, 2:30 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> This test ensures that attribute information is transported through Asterisk.
> 
> 
> Diffs
> -----
> 
>   /asterisk/trunk/tests/channels/SIP/SDP_attribute_passthrough/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/SDP_attribute_passthrough/configs/ast1/sip.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/SDP_attribute_passthrough/run-test PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/SDP_attribute_passthrough/sipp/phone_A_h263.xml PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/SDP_attribute_passthrough/sipp/phone_A_h264.xml PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/SDP_attribute_passthrough/sipp/phone_A_speex.xml PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/SDP_attribute_passthrough/sipp/phone_B_h263.xml PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/SDP_attribute_passthrough/sipp/phone_B_h264.xml PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/SDP_attribute_passthrough/sipp/phone_B_speex.xml PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/SDP_attribute_passthrough/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/tests.yaml 3307 
> 
> Diff: https://reviewboard.asterisk.org/r/2029/diff
> 
> 
> Testing
> -------
> 
> Ran it, checked to make sure it worked okay. Tweaked test to fail and made sure it failed as expected.
> 
> 
> Thanks,
> 
> Joshua
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120710/86d51ab7/attachment.htm>


More information about the asterisk-dev mailing list