SipUnit 0.0.6b review

Download
by rbytes.net on

SipUnit provides a test environment geared toward unit testing SIP applications

License: The Apache License 2.0
File size: 0K
Developer: Becky Mc
0 stars award from rbytes.net

SipUnit provides a test environment geared toward unit testing SIP applications. SipUnit project extends the JUnit test framework to incorporate SIP-specific assertions, and it provides a high-level API for performing the SIP operations needed to interact with or invoke a test target.

A test program using the SipUnit API is written in Java and acts as a network element that sends/receives SIP requests and responses. The SipUnit API includes SIP User Agent Client (UAC), User Agent Server (UAS), and basic UAC/UAS Core functionality - the set of processing functions that resides above the SIP transaction and transport layers - for the purpose of interacting with the test target.

SipUnit uses the JAIN-SIP reference implementation as its underlying SIP stack/engine. The primary goal of SipUnit is to abstract the details of SIP messaging/call handling and facilitate free-flowing, sequential test code so that a test target can be exercised quickly and painlessly.

A test program using SipUnit API:

1. Extends SipTestCase
2. Creates SipUnit API objects - SipStack, SipPhone, SipCall, etc.
3. Calls methods on the object(s) to set up and initiate action toward a SIP test target. For example: SipPhone.makeCall("sip:roger@nist.gov", SipResponse.OK, ....) makes a vanilla call to sip:roger@nist.gov and blocks until an OK is received or a timeout occurs. The test target could be any node up to and including the final destination of the INVITE request message.
4. Verifies the results of the action involving the test target using both the SIP-specific assert methods provided by SipUnit and the standard JUnit assert methods. For example: assertHeaderContains(sipCall.getLastReceivedResponse(), "From", "sip:amit@nist.gov"), assertEquals("Unexpected response received", SipResponse.OK, sipCall.getReturnCode()).

Here are some key features of "SipUnit":
A basic set of SIP-specific assert methods - assertHeaderPresent(), assertHeaderContains(), assertBodyPresent(), etc.
High level API for interacting with a test target.
Low-level SIP messaging access for interacting with a test target.
Registration/unregistration and call processing with or without authentication (DIGEST).
Support for testcase-specified timeouts.
Support for different routing configurations.

What's New in This Release:
Support was added to the SipPhone and SipSession classes for running SipUnit tests from behind a NAT and communicating with a SIP server on the Internet.
A STUN example test was included.
An enhancement that allows more flexible multiple SIP stack creation was incorporated.

SipUnit 0.0.6b keywords