SlideShare una empresa de Scribd logo
1 de 20
Descargar para leer sin conexión
Testing SIP Applications with
         Arquillian and SipUnit

      Annual Mobicents Community Summit
          Rio de Janeiro, October 3-8, 2012



George Vagenas
CDI Telco Framework & SIP Testing project lead
Agenda
●   Introduction
    ○   SipServlets applications testing
    ○   Arquillian extension for SipServlets
    ○   SipUnit
● Arquillian Extension for SipServlets
  ○ Features
  ○ MSS Tomcat 6 & Tomcat 7 containers
● SipUnit
  ○ Features
Past year achievements

● Arquillian Extension for SipServlets 1.0.0.ALPHA1
● Telestax took over leadership of SipUnit
● SipUnit 2.0.0
SipServlets applications testing

Requirements:
● Manage SipServlets enabled container
● Manage test archive
● Integration with a testing framework (JUnit
  or TestNG)
● SIP Client (UAC/UAS) to interact with the
  SipServlet application
Arquillian Extension for
SipServlets
Arquillian testing framework, seeks to minimize the burden
on the developer to author integration tests by handling all
aspects of test execution, including:
● managing the lifecycle of the container (start/stop),
● bundling the test class with dependent classes and
   resources into a deployable archive,
● enhancing the test class (e.g., resolving @Inject, @EJB
   and @Resource injections),
● deploying the archive to test (deploy/undeploy) and
   capturing results and failures.
Arquillian Extension for
SipServlets
Mobicents brings the Sip Servlets Arquillian
container for testing converged applications.

Container is based on:
● Tomcat 6.x
● Tomcat 7.x
Arquillian Extension for
SipServlets
Extras
● Annotations
   ○ @ContextParam
   ○ @ContextParamMap
   ○ @ConcurrencyControlMode
● Helper classes
   ○ ContextParamTool
   ○ SipStackTool
● Lifecycle extension to provide finer grained
  control over container's and test's lifecycle
Arquillian Extension for
SipServlets
● Finer grained control over the test's lifecycle
  and the container's lifecycle
● Override container configuration as needed
● The integration is completely transparent,
  which means you can launch the tests and
  get the test results using existing IDE, Ant
  and Maven test plugins without any add-ons.
Arquillian Extension for
SipServlets
● CTF can be optionally enabled in order to
  enrich the test or the test archive.
● On the same test we can have
  ○ Multiple test archives
  ○ Multiple container configuration
Arquillian Extension for
   SipServlets
<container qualifier="mss-tomcat-embedded-6" default="true" mode="
manual">
        <configuration>
             <property name="tomcatHome">target/mss-tomcat-embedded-
6</property>
             <property name="workDir">work</property>
             <property name="bindHttpPort">8888</property>
             <property name="unpackArchive">true</property>
             <property name="sipConnectors">:5070,:5070/TCP</property>
             <property name="bindAddress">127.0.0.1</property>
             <property name="sipApplicationRouterProviderClassName">org.
mobicents.servlet.sip.router.DefaultApplicationRouterProvider</property>
        </configuration>
    </container>
Arquillian Extension for
SipServlets
@RunWith(Arquillian.class)
public class ShootistSipServletTest extends SipTestCase
{
@Deployment(name="simpleArchive", managed=false)
    public static WebArchive createTestArchive(){
    WebArchive webArchive = ShrinkWrap.create(WebArchive.class,"
    shootistsipservlet.war");
    webArchive.addClasses(ShootistSipServlet.class);
    webArchive.addAsWebInfResource("in-container-sip.xml", "sip.xml");
    return webArchive;
    }
Arquillian Extension for
SipServlets
    @Test @ContextParam(name="cancel", value="true")
    public void testShootist() throws Exception {


         SipStackTool sipStackTool = new SipStackTool();
         receiver = sipStackTool.initializeSipStack(SipStack.PROTOCOL_UDP,
"127.0.0.1", "5080", "127.0.0.1:5070");
       sipPhone = receiver.createSipPhone("127.0.0.1", SipStack.
PROTOCOL_UDP, 5070, "sip:LittleGuy@there.com");
       sipCall = sipPhone.createSipCall();
       sipCall.listenForIncomingCall();
       deployer.deploy("simpleArchive");
       assertTrue(sipCall.waitForIncomingCall(timeout));
       assertTrue(sipCall.sendIncomingCallResponse(Response.TRYING,"
   Trying", timeout));
Arquillian Extension for
SipServlets


What comes next:
● Mobicents Sip Servlets AS7 container
SipUnit

SipUnit provides a test environment geared
toward unit testing SIP applications.

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
SipUnit features

● Maven artifacts
● Junit 4 support
● TLS support
● SIP UAC & UAS
● uses the JAIN-SIP reference implementation as its
  underlying SIP stack/engine
● JUnit-like test development and execution environment
  with SIP-specific assertions added
● Different levels of SIP handling abstraction depending
  on test case needs. If you don't care how a setup call
  gets established, use the highest level - SipPhone.
  makeCall().
SipUnit features
● Support for registration and call handling with or without
  authentication
● Support for presence subscription handling
  (SUBSCRIBE/NOTIFY)
● CANCEL handling
● Support for MESSAGE
● REFER and associated subscription handling
● Support for NAT traversal (STUN)
● Support for testcase-specified timeouts
● A test can act as more than one network element - ie, it
  can act as both the caller and callee endpoints to test a
  network element between the two.
SipUnit example
b.listenForIncomingCall();

a.initiateOutgoingCall("sip:becky@nist.gov",                 null);

b.waitForIncomingCall(5000);

b.sendIncomingCallResponse(Response.RINGING,    "Ringing",     0);

a.waitOutgoingCallResponse(10000);

b.sendIncomingCallResponse(Response.OK, "Answer - Hello world",
0);

a.waitOutgoingCallResponse(10000);

a.sendInviteOkAck();
SipUnit download
●   Binary: http://code.google.com/p/commtesting/downloads/list
●   Maven artifact
        <dependency>
                                                        <groupId>org.cafesip.sipunit</groupId>
                                                                <artifactId>sipunit</artifactId>
                                                                     <version>2.0.0</version>
        </dependency>
        <repository>
             <id>mobicents-public-repository-group</id>
             <name>Mobicens          Public       Maven        Repository       Group</name>
             <url>https://oss.sonatype.org/content/groups/public</url>
             <layout>default</layout>
             <releases>
                   <enabled>true</enabled>
                   <updatePolicy>never</updatePolicy>
             </releases>
             <snapshots>
                   <enabled>true</enabled>
                   <updatePolicy>never</updatePolicy>
             </snapshots>
        </repository>
SipServletes Commtesting links

●   Project site: http://code.google.com/p/commtesting/
●   SipServlets Arquillian Extension Documentation: https://mobicents.ci.cloudbees.
    com/view/SIP%20Testing/job/sipservlets.
    arquillian/lastSuccessfulBuild/artifact/documentation/html_single/index.html

●   SipUnit Documentation: https://mobicents.ci.cloudbees.
    com/job/SipUnit/lastSuccessfulBuild/artifact/sipunit/docs/jdocbook-
    mobicents/target/docbook/publish/en-US/html_single/index.html
Contact


George Vagenas
gvagenas@gmail.com


Thank you

Más contenido relacionado

La actualidad más candente

Amending and Testing changes lab guide
Amending and Testing changes lab guideAmending and Testing changes lab guide
Amending and Testing changes lab guideopenstackcisco
 
client-go: The Good, The Bad and The Ugly
client-go: The Good, The Bad and The Uglyclient-go: The Good, The Bad and The Ugly
client-go: The Good, The Bad and The UglyLili Cosic
 
Monitoring kubernetes with prometheus-operator
Monitoring kubernetes with prometheus-operatorMonitoring kubernetes with prometheus-operator
Monitoring kubernetes with prometheus-operatorLili Cosic
 
Expert Day 2019 - CaaSP et CAP
Expert Day 2019 - CaaSP et CAPExpert Day 2019 - CaaSP et CAP
Expert Day 2019 - CaaSP et CAPSUSE
 
Java 9 and the impact on Maven Projects (Devoxx 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)Java 9 and the impact on Maven Projects (Devoxx 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)Robert Scholte
 
Testing the Enterprise layers, with Arquillian
Testing the Enterprise layers, with ArquillianTesting the Enterprise layers, with Arquillian
Testing the Enterprise layers, with ArquillianVirtual JBoss User Group
 
WSO2 Product Release webinar - WSO2 Carbon 4.3
WSO2 Product Release webinar - WSO2 Carbon 4.3 WSO2 Product Release webinar - WSO2 Carbon 4.3
WSO2 Product Release webinar - WSO2 Carbon 4.3 WSO2
 
Expert Day 2019 - HA et SAP : How QA is done
Expert Day 2019 - HA et SAP : How QA is doneExpert Day 2019 - HA et SAP : How QA is done
Expert Day 2019 - HA et SAP : How QA is doneSUSE
 
Managing an OSGi Framework with Apache Felix Web Console
Managing an OSGi Framework with  Apache Felix Web ConsoleManaging an OSGi Framework with  Apache Felix Web Console
Managing an OSGi Framework with Apache Felix Web ConsoleFelix Meschberger
 
Continuos integration for iOS projects
Continuos integration for iOS projectsContinuos integration for iOS projects
Continuos integration for iOS projectsAleksandra Gavrilovska
 
Kirill Rozin - Practical Wars for Automatization
Kirill Rozin - Practical Wars for AutomatizationKirill Rozin - Practical Wars for Automatization
Kirill Rozin - Practical Wars for AutomatizationSergey Arkhipov
 
OSGi in 5 minutes
OSGi in 5 minutesOSGi in 5 minutes
OSGi in 5 minutesSerge Huber
 
Apache Tomcat 7 by Filip Hanik
Apache Tomcat 7 by Filip HanikApache Tomcat 7 by Filip Hanik
Apache Tomcat 7 by Filip HanikEdgar Espina
 
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context ConstraintsAlessandro Arrichiello
 
The Web on OSGi: Here's How
The Web on OSGi: Here's HowThe Web on OSGi: Here's How
The Web on OSGi: Here's Howmrdon
 
Pax – Tools für den OSGi Alltag
Pax – Tools für den OSGi AlltagPax – Tools für den OSGi Alltag
Pax – Tools für den OSGi AlltagPatrick Baumgartner
 
Installation guide
Installation guideInstallation guide
Installation guidelaonap166
 

La actualidad más candente (20)

Amending and Testing changes lab guide
Amending and Testing changes lab guideAmending and Testing changes lab guide
Amending and Testing changes lab guide
 
GlassFish Embedded API
GlassFish Embedded APIGlassFish Embedded API
GlassFish Embedded API
 
GlassFish v3 Prelude Aquarium Paris
GlassFish v3 Prelude Aquarium ParisGlassFish v3 Prelude Aquarium Paris
GlassFish v3 Prelude Aquarium Paris
 
client-go: The Good, The Bad and The Ugly
client-go: The Good, The Bad and The Uglyclient-go: The Good, The Bad and The Ugly
client-go: The Good, The Bad and The Ugly
 
Monitoring kubernetes with prometheus-operator
Monitoring kubernetes with prometheus-operatorMonitoring kubernetes with prometheus-operator
Monitoring kubernetes with prometheus-operator
 
Expert Day 2019 - CaaSP et CAP
Expert Day 2019 - CaaSP et CAPExpert Day 2019 - CaaSP et CAP
Expert Day 2019 - CaaSP et CAP
 
Java 9 and the impact on Maven Projects (Devoxx 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)Java 9 and the impact on Maven Projects (Devoxx 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)
 
Testing the Enterprise layers, with Arquillian
Testing the Enterprise layers, with ArquillianTesting the Enterprise layers, with Arquillian
Testing the Enterprise layers, with Arquillian
 
WSO2 Product Release webinar - WSO2 Carbon 4.3
WSO2 Product Release webinar - WSO2 Carbon 4.3 WSO2 Product Release webinar - WSO2 Carbon 4.3
WSO2 Product Release webinar - WSO2 Carbon 4.3
 
Expert Day 2019 - HA et SAP : How QA is done
Expert Day 2019 - HA et SAP : How QA is doneExpert Day 2019 - HA et SAP : How QA is done
Expert Day 2019 - HA et SAP : How QA is done
 
Managing an OSGi Framework with Apache Felix Web Console
Managing an OSGi Framework with  Apache Felix Web ConsoleManaging an OSGi Framework with  Apache Felix Web Console
Managing an OSGi Framework with Apache Felix Web Console
 
Java 9 and Beyond
Java 9 and BeyondJava 9 and Beyond
Java 9 and Beyond
 
Continuos integration for iOS projects
Continuos integration for iOS projectsContinuos integration for iOS projects
Continuos integration for iOS projects
 
Kirill Rozin - Practical Wars for Automatization
Kirill Rozin - Practical Wars for AutomatizationKirill Rozin - Practical Wars for Automatization
Kirill Rozin - Practical Wars for Automatization
 
OSGi in 5 minutes
OSGi in 5 minutesOSGi in 5 minutes
OSGi in 5 minutes
 
Apache Tomcat 7 by Filip Hanik
Apache Tomcat 7 by Filip HanikApache Tomcat 7 by Filip Hanik
Apache Tomcat 7 by Filip Hanik
 
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
 
The Web on OSGi: Here's How
The Web on OSGi: Here's HowThe Web on OSGi: Here's How
The Web on OSGi: Here's How
 
Pax – Tools für den OSGi Alltag
Pax – Tools für den OSGi AlltagPax – Tools für den OSGi Alltag
Pax – Tools für den OSGi Alltag
 
Installation guide
Installation guideInstallation guide
Installation guide
 

Similar a Mobicents Summit 2012 - George Vagenas - Testing SIP Applications with Arquillian and SipUnit

CDI Telco Framework & Arquillian presentation at Mobicents Summit, Sochi 2011
CDI Telco Framework & Arquillian presentation at Mobicents Summit, Sochi 2011CDI Telco Framework & Arquillian presentation at Mobicents Summit, Sochi 2011
CDI Telco Framework & Arquillian presentation at Mobicents Summit, Sochi 2011telestax
 
Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)CIVEL Benoit
 
Cerberus_Presentation1
Cerberus_Presentation1Cerberus_Presentation1
Cerberus_Presentation1CIVEL Benoit
 
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010Arun Gupta
 
Don't Deploy Into the Dark: DORA Metrics for your K8s GitOps Deployments
Don't Deploy Into the Dark: DORA Metrics for your K8s GitOps DeploymentsDon't Deploy Into the Dark: DORA Metrics for your K8s GitOps Deployments
Don't Deploy Into the Dark: DORA Metrics for your K8s GitOps DeploymentsAndreas Grabner
 
Tuning and development with SIP Servlets on Mobicents
Tuning and development with SIP Servlets on MobicentsTuning and development with SIP Servlets on Mobicents
Tuning and development with SIP Servlets on MobicentsJean Deruelle
 
JavaOne 2017 - TestContainers: integration testing without the hassle
JavaOne 2017 - TestContainers: integration testing without the hassleJavaOne 2017 - TestContainers: integration testing without the hassle
JavaOne 2017 - TestContainers: integration testing without the hassleAnton Arhipov
 
Chicago DevOps Meetup Nov2019
Chicago DevOps Meetup Nov2019Chicago DevOps Meetup Nov2019
Chicago DevOps Meetup Nov2019Mike Villiger
 
Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gat...
Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gat...Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gat...
Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gat...VMware Tanzu
 
JavaOne India 2011 - Servlets 3.0
JavaOne India 2011 - Servlets 3.0JavaOne India 2011 - Servlets 3.0
JavaOne India 2011 - Servlets 3.0Arun Gupta
 
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-AppsSelenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-Appschrisb206 chrisb206
 
Anatomy of a Build Pipeline
Anatomy of a Build PipelineAnatomy of a Build Pipeline
Anatomy of a Build PipelineSamuel Brown
 
Openshift cheat rhce_r3v1 rhce
Openshift cheat rhce_r3v1 rhceOpenshift cheat rhce_r3v1 rhce
Openshift cheat rhce_r3v1 rhceDarnette A
 
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
 Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to realityDaniel Gallego Vico
 
20171122 aws usergrp_coretech-spn-cicd-aws-v01
20171122 aws usergrp_coretech-spn-cicd-aws-v0120171122 aws usergrp_coretech-spn-cicd-aws-v01
20171122 aws usergrp_coretech-spn-cicd-aws-v01Scott Miao
 
Level Up Your Integration Testing With Testcontainers
Level Up Your Integration Testing With TestcontainersLevel Up Your Integration Testing With Testcontainers
Level Up Your Integration Testing With TestcontainersVMware Tanzu
 
Java servlet technology
Java servlet technologyJava servlet technology
Java servlet technologyMinal Maniar
 
Introduction to java servlet 3.0 api javaone 2009
Introduction to java servlet 3.0 api javaone 2009Introduction to java servlet 3.0 api javaone 2009
Introduction to java servlet 3.0 api javaone 2009JavaEE Trainers
 

Similar a Mobicents Summit 2012 - George Vagenas - Testing SIP Applications with Arquillian and SipUnit (20)

CDI Telco Framework & Arquillian presentation at Mobicents Summit, Sochi 2011
CDI Telco Framework & Arquillian presentation at Mobicents Summit, Sochi 2011CDI Telco Framework & Arquillian presentation at Mobicents Summit, Sochi 2011
CDI Telco Framework & Arquillian presentation at Mobicents Summit, Sochi 2011
 
Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)
 
Cerberus_Presentation1
Cerberus_Presentation1Cerberus_Presentation1
Cerberus_Presentation1
 
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010
 
Don't Deploy Into the Dark: DORA Metrics for your K8s GitOps Deployments
Don't Deploy Into the Dark: DORA Metrics for your K8s GitOps DeploymentsDon't Deploy Into the Dark: DORA Metrics for your K8s GitOps Deployments
Don't Deploy Into the Dark: DORA Metrics for your K8s GitOps Deployments
 
Tuning and development with SIP Servlets on Mobicents
Tuning and development with SIP Servlets on MobicentsTuning and development with SIP Servlets on Mobicents
Tuning and development with SIP Servlets on Mobicents
 
JavaOne 2017 - TestContainers: integration testing without the hassle
JavaOne 2017 - TestContainers: integration testing without the hassleJavaOne 2017 - TestContainers: integration testing without the hassle
JavaOne 2017 - TestContainers: integration testing without the hassle
 
Chicago DevOps Meetup Nov2019
Chicago DevOps Meetup Nov2019Chicago DevOps Meetup Nov2019
Chicago DevOps Meetup Nov2019
 
Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gat...
Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gat...Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gat...
Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gat...
 
JavaOne India 2011 - Servlets 3.0
JavaOne India 2011 - Servlets 3.0JavaOne India 2011 - Servlets 3.0
JavaOne India 2011 - Servlets 3.0
 
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-AppsSelenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
 
Anatomy of a Build Pipeline
Anatomy of a Build PipelineAnatomy of a Build Pipeline
Anatomy of a Build Pipeline
 
Maven basic concept
Maven basic conceptMaven basic concept
Maven basic concept
 
Openshift cheat rhce_r3v1 rhce
Openshift cheat rhce_r3v1 rhceOpenshift cheat rhce_r3v1 rhce
Openshift cheat rhce_r3v1 rhce
 
Spinnaker Chadev
Spinnaker ChadevSpinnaker Chadev
Spinnaker Chadev
 
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
 Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
 
20171122 aws usergrp_coretech-spn-cicd-aws-v01
20171122 aws usergrp_coretech-spn-cicd-aws-v0120171122 aws usergrp_coretech-spn-cicd-aws-v01
20171122 aws usergrp_coretech-spn-cicd-aws-v01
 
Level Up Your Integration Testing With Testcontainers
Level Up Your Integration Testing With TestcontainersLevel Up Your Integration Testing With Testcontainers
Level Up Your Integration Testing With Testcontainers
 
Java servlet technology
Java servlet technologyJava servlet technology
Java servlet technology
 
Introduction to java servlet 3.0 api javaone 2009
Introduction to java servlet 3.0 api javaone 2009Introduction to java servlet 3.0 api javaone 2009
Introduction to java servlet 3.0 api javaone 2009
 

Más de telestax

Api and fly! CPaaS Enablement: Combining Apps, Networks, and APIs
Api and fly! CPaaS Enablement:  Combining Apps, Networks, and APIsApi and fly! CPaaS Enablement:  Combining Apps, Networks, and APIs
Api and fly! CPaaS Enablement: Combining Apps, Networks, and APIstelestax
 
RestComm Architecture Design
RestComm Architecture DesignRestComm Architecture Design
RestComm Architecture Designtelestax
 
RestComm Mobile Client SDKs
RestComm Mobile Client SDKsRestComm Mobile Client SDKs
RestComm Mobile Client SDKstelestax
 
Location Based Services at Heterogeneous Networks
Location Based Services at Heterogeneous NetworksLocation Based Services at Heterogeneous Networks
Location Based Services at Heterogeneous Networkstelestax
 
Restcomm past and future
Restcomm past and futureRestcomm past and future
Restcomm past and futuretelestax
 
Restcomm in an oauth environment
Restcomm in an oauth environmentRestcomm in an oauth environment
Restcomm in an oauth environmenttelestax
 
Restconn 2015 products
Restconn 2015 productsRestconn 2015 products
Restconn 2015 productstelestax
 
Restconn 2015 products
Restconn 2015 productsRestconn 2015 products
Restconn 2015 productstelestax
 
New Opportunities for Real Time Communications - WebRTC Conference Japan - Fe...
New Opportunities for Real Time Communications - WebRTC Conference Japan - Fe...New Opportunities for Real Time Communications - WebRTC Conference Japan - Fe...
New Opportunities for Real Time Communications - WebRTC Conference Japan - Fe...telestax
 
TeleStax - Convergence - uFone - AWCC - TADS 2014
TeleStax - Convergence - uFone - AWCC - TADS 2014TeleStax - Convergence - uFone - AWCC - TADS 2014
TeleStax - Convergence - uFone - AWCC - TADS 2014telestax
 
New Business Opportunities created by the IoT Explosion - WebRTCSummit - San...
New Business Opportunities created by the IoT Explosion - WebRTCSummit  - San...New Business Opportunities created by the IoT Explosion - WebRTCSummit  - San...
New Business Opportunities created by the IoT Explosion - WebRTCSummit - San...telestax
 
Boost JBoss AS7 with HTML5 WebRTC for Real Time Communications
Boost JBoss AS7 with HTML5 WebRTC for Real Time CommunicationsBoost JBoss AS7 with HTML5 WebRTC for Real Time Communications
Boost JBoss AS7 with HTML5 WebRTC for Real Time Communicationstelestax
 
Restcomm in Telehealth - Web RTC Summit - November 2013 - Santa Clara, CA
Restcomm in Telehealth - Web RTC Summit - November 2013 - Santa Clara, CARestcomm in Telehealth - Web RTC Summit - November 2013 - Santa Clara, CA
Restcomm in Telehealth - Web RTC Summit - November 2013 - Santa Clara, CAtelestax
 
Tel scale ussd_gateway-vuc
Tel scale ussd_gateway-vucTel scale ussd_gateway-vuc
Tel scale ussd_gateway-vuctelestax
 
Open Source Hangouts on WebRTC - WebRTC Workshop IMS World Forum
Open Source Hangouts on WebRTC - WebRTC Workshop IMS World ForumOpen Source Hangouts on WebRTC - WebRTC Workshop IMS World Forum
Open Source Hangouts on WebRTC - WebRTC Workshop IMS World Forumtelestax
 
Boost JBoss AS7 with HTML5 WebRTC for Real Time Communications
Boost JBoss AS7 with HTML5 WebRTC for Real Time CommunicationsBoost JBoss AS7 with HTML5 WebRTC for Real Time Communications
Boost JBoss AS7 with HTML5 WebRTC for Real Time Communicationstelestax
 
Mobicents Summit 2012 - CTBC/Algar TeleCom - Simplifying CTBC's IVR System an...
Mobicents Summit 2012 - CTBC/Algar TeleCom - Simplifying CTBC's IVR System an...Mobicents Summit 2012 - CTBC/Algar TeleCom - Simplifying CTBC's IVR System an...
Mobicents Summit 2012 - CTBC/Algar TeleCom - Simplifying CTBC's IVR System an...telestax
 
Mobicents Summit 2012 - Twilio Expanding internationally Challenges Solutions
Mobicents Summit 2012 - Twilio Expanding internationally Challenges SolutionsMobicents Summit 2012 - Twilio Expanding internationally Challenges Solutions
Mobicents Summit 2012 - Twilio Expanding internationally Challenges Solutionstelestax
 
Mobicents Summit 2012 - Jonas Borjesson - Introduction to Twilio
Mobicents Summit 2012 - Jonas Borjesson - Introduction to TwilioMobicents Summit 2012 - Jonas Borjesson - Introduction to Twilio
Mobicents Summit 2012 - Jonas Borjesson - Introduction to Twiliotelestax
 
Mobicents Summit 2012 - TeleStax Keynote
Mobicents Summit 2012 - TeleStax KeynoteMobicents Summit 2012 - TeleStax Keynote
Mobicents Summit 2012 - TeleStax Keynotetelestax
 

Más de telestax (20)

Api and fly! CPaaS Enablement: Combining Apps, Networks, and APIs
Api and fly! CPaaS Enablement:  Combining Apps, Networks, and APIsApi and fly! CPaaS Enablement:  Combining Apps, Networks, and APIs
Api and fly! CPaaS Enablement: Combining Apps, Networks, and APIs
 
RestComm Architecture Design
RestComm Architecture DesignRestComm Architecture Design
RestComm Architecture Design
 
RestComm Mobile Client SDKs
RestComm Mobile Client SDKsRestComm Mobile Client SDKs
RestComm Mobile Client SDKs
 
Location Based Services at Heterogeneous Networks
Location Based Services at Heterogeneous NetworksLocation Based Services at Heterogeneous Networks
Location Based Services at Heterogeneous Networks
 
Restcomm past and future
Restcomm past and futureRestcomm past and future
Restcomm past and future
 
Restcomm in an oauth environment
Restcomm in an oauth environmentRestcomm in an oauth environment
Restcomm in an oauth environment
 
Restconn 2015 products
Restconn 2015 productsRestconn 2015 products
Restconn 2015 products
 
Restconn 2015 products
Restconn 2015 productsRestconn 2015 products
Restconn 2015 products
 
New Opportunities for Real Time Communications - WebRTC Conference Japan - Fe...
New Opportunities for Real Time Communications - WebRTC Conference Japan - Fe...New Opportunities for Real Time Communications - WebRTC Conference Japan - Fe...
New Opportunities for Real Time Communications - WebRTC Conference Japan - Fe...
 
TeleStax - Convergence - uFone - AWCC - TADS 2014
TeleStax - Convergence - uFone - AWCC - TADS 2014TeleStax - Convergence - uFone - AWCC - TADS 2014
TeleStax - Convergence - uFone - AWCC - TADS 2014
 
New Business Opportunities created by the IoT Explosion - WebRTCSummit - San...
New Business Opportunities created by the IoT Explosion - WebRTCSummit  - San...New Business Opportunities created by the IoT Explosion - WebRTCSummit  - San...
New Business Opportunities created by the IoT Explosion - WebRTCSummit - San...
 
Boost JBoss AS7 with HTML5 WebRTC for Real Time Communications
Boost JBoss AS7 with HTML5 WebRTC for Real Time CommunicationsBoost JBoss AS7 with HTML5 WebRTC for Real Time Communications
Boost JBoss AS7 with HTML5 WebRTC for Real Time Communications
 
Restcomm in Telehealth - Web RTC Summit - November 2013 - Santa Clara, CA
Restcomm in Telehealth - Web RTC Summit - November 2013 - Santa Clara, CARestcomm in Telehealth - Web RTC Summit - November 2013 - Santa Clara, CA
Restcomm in Telehealth - Web RTC Summit - November 2013 - Santa Clara, CA
 
Tel scale ussd_gateway-vuc
Tel scale ussd_gateway-vucTel scale ussd_gateway-vuc
Tel scale ussd_gateway-vuc
 
Open Source Hangouts on WebRTC - WebRTC Workshop IMS World Forum
Open Source Hangouts on WebRTC - WebRTC Workshop IMS World ForumOpen Source Hangouts on WebRTC - WebRTC Workshop IMS World Forum
Open Source Hangouts on WebRTC - WebRTC Workshop IMS World Forum
 
Boost JBoss AS7 with HTML5 WebRTC for Real Time Communications
Boost JBoss AS7 with HTML5 WebRTC for Real Time CommunicationsBoost JBoss AS7 with HTML5 WebRTC for Real Time Communications
Boost JBoss AS7 with HTML5 WebRTC for Real Time Communications
 
Mobicents Summit 2012 - CTBC/Algar TeleCom - Simplifying CTBC's IVR System an...
Mobicents Summit 2012 - CTBC/Algar TeleCom - Simplifying CTBC's IVR System an...Mobicents Summit 2012 - CTBC/Algar TeleCom - Simplifying CTBC's IVR System an...
Mobicents Summit 2012 - CTBC/Algar TeleCom - Simplifying CTBC's IVR System an...
 
Mobicents Summit 2012 - Twilio Expanding internationally Challenges Solutions
Mobicents Summit 2012 - Twilio Expanding internationally Challenges SolutionsMobicents Summit 2012 - Twilio Expanding internationally Challenges Solutions
Mobicents Summit 2012 - Twilio Expanding internationally Challenges Solutions
 
Mobicents Summit 2012 - Jonas Borjesson - Introduction to Twilio
Mobicents Summit 2012 - Jonas Borjesson - Introduction to TwilioMobicents Summit 2012 - Jonas Borjesson - Introduction to Twilio
Mobicents Summit 2012 - Jonas Borjesson - Introduction to Twilio
 
Mobicents Summit 2012 - TeleStax Keynote
Mobicents Summit 2012 - TeleStax KeynoteMobicents Summit 2012 - TeleStax Keynote
Mobicents Summit 2012 - TeleStax Keynote
 

Mobicents Summit 2012 - George Vagenas - Testing SIP Applications with Arquillian and SipUnit

  • 1. Testing SIP Applications with Arquillian and SipUnit Annual Mobicents Community Summit Rio de Janeiro, October 3-8, 2012 George Vagenas CDI Telco Framework & SIP Testing project lead
  • 2. Agenda ● Introduction ○ SipServlets applications testing ○ Arquillian extension for SipServlets ○ SipUnit ● Arquillian Extension for SipServlets ○ Features ○ MSS Tomcat 6 & Tomcat 7 containers ● SipUnit ○ Features
  • 3. Past year achievements ● Arquillian Extension for SipServlets 1.0.0.ALPHA1 ● Telestax took over leadership of SipUnit ● SipUnit 2.0.0
  • 4. SipServlets applications testing Requirements: ● Manage SipServlets enabled container ● Manage test archive ● Integration with a testing framework (JUnit or TestNG) ● SIP Client (UAC/UAS) to interact with the SipServlet application
  • 5. Arquillian Extension for SipServlets Arquillian testing framework, seeks to minimize the burden on the developer to author integration tests by handling all aspects of test execution, including: ● managing the lifecycle of the container (start/stop), ● bundling the test class with dependent classes and resources into a deployable archive, ● enhancing the test class (e.g., resolving @Inject, @EJB and @Resource injections), ● deploying the archive to test (deploy/undeploy) and capturing results and failures.
  • 6. Arquillian Extension for SipServlets Mobicents brings the Sip Servlets Arquillian container for testing converged applications. Container is based on: ● Tomcat 6.x ● Tomcat 7.x
  • 7. Arquillian Extension for SipServlets Extras ● Annotations ○ @ContextParam ○ @ContextParamMap ○ @ConcurrencyControlMode ● Helper classes ○ ContextParamTool ○ SipStackTool ● Lifecycle extension to provide finer grained control over container's and test's lifecycle
  • 8. Arquillian Extension for SipServlets ● Finer grained control over the test's lifecycle and the container's lifecycle ● Override container configuration as needed ● The integration is completely transparent, which means you can launch the tests and get the test results using existing IDE, Ant and Maven test plugins without any add-ons.
  • 9. Arquillian Extension for SipServlets ● CTF can be optionally enabled in order to enrich the test or the test archive. ● On the same test we can have ○ Multiple test archives ○ Multiple container configuration
  • 10. Arquillian Extension for SipServlets <container qualifier="mss-tomcat-embedded-6" default="true" mode=" manual"> <configuration> <property name="tomcatHome">target/mss-tomcat-embedded- 6</property> <property name="workDir">work</property> <property name="bindHttpPort">8888</property> <property name="unpackArchive">true</property> <property name="sipConnectors">:5070,:5070/TCP</property> <property name="bindAddress">127.0.0.1</property> <property name="sipApplicationRouterProviderClassName">org. mobicents.servlet.sip.router.DefaultApplicationRouterProvider</property> </configuration> </container>
  • 11. Arquillian Extension for SipServlets @RunWith(Arquillian.class) public class ShootistSipServletTest extends SipTestCase { @Deployment(name="simpleArchive", managed=false) public static WebArchive createTestArchive(){ WebArchive webArchive = ShrinkWrap.create(WebArchive.class," shootistsipservlet.war"); webArchive.addClasses(ShootistSipServlet.class); webArchive.addAsWebInfResource("in-container-sip.xml", "sip.xml"); return webArchive; }
  • 12. Arquillian Extension for SipServlets @Test @ContextParam(name="cancel", value="true") public void testShootist() throws Exception { SipStackTool sipStackTool = new SipStackTool(); receiver = sipStackTool.initializeSipStack(SipStack.PROTOCOL_UDP, "127.0.0.1", "5080", "127.0.0.1:5070"); sipPhone = receiver.createSipPhone("127.0.0.1", SipStack. PROTOCOL_UDP, 5070, "sip:LittleGuy@there.com"); sipCall = sipPhone.createSipCall(); sipCall.listenForIncomingCall(); deployer.deploy("simpleArchive"); assertTrue(sipCall.waitForIncomingCall(timeout)); assertTrue(sipCall.sendIncomingCallResponse(Response.TRYING," Trying", timeout));
  • 13. Arquillian Extension for SipServlets What comes next: ● Mobicents Sip Servlets AS7 container
  • 14. SipUnit SipUnit provides a test environment geared toward unit testing SIP applications. 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
  • 15. SipUnit features ● Maven artifacts ● Junit 4 support ● TLS support ● SIP UAC & UAS ● uses the JAIN-SIP reference implementation as its underlying SIP stack/engine ● JUnit-like test development and execution environment with SIP-specific assertions added ● Different levels of SIP handling abstraction depending on test case needs. If you don't care how a setup call gets established, use the highest level - SipPhone. makeCall().
  • 16. SipUnit features ● Support for registration and call handling with or without authentication ● Support for presence subscription handling (SUBSCRIBE/NOTIFY) ● CANCEL handling ● Support for MESSAGE ● REFER and associated subscription handling ● Support for NAT traversal (STUN) ● Support for testcase-specified timeouts ● A test can act as more than one network element - ie, it can act as both the caller and callee endpoints to test a network element between the two.
  • 17. SipUnit example b.listenForIncomingCall(); a.initiateOutgoingCall("sip:becky@nist.gov", null); b.waitForIncomingCall(5000); b.sendIncomingCallResponse(Response.RINGING, "Ringing", 0); a.waitOutgoingCallResponse(10000); b.sendIncomingCallResponse(Response.OK, "Answer - Hello world", 0); a.waitOutgoingCallResponse(10000); a.sendInviteOkAck();
  • 18. SipUnit download ● Binary: http://code.google.com/p/commtesting/downloads/list ● Maven artifact <dependency> <groupId>org.cafesip.sipunit</groupId> <artifactId>sipunit</artifactId> <version>2.0.0</version> </dependency> <repository> <id>mobicents-public-repository-group</id> <name>Mobicens Public Maven Repository Group</name> <url>https://oss.sonatype.org/content/groups/public</url> <layout>default</layout> <releases> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </releases> <snapshots> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </snapshots> </repository>
  • 19. SipServletes Commtesting links ● Project site: http://code.google.com/p/commtesting/ ● SipServlets Arquillian Extension Documentation: https://mobicents.ci.cloudbees. com/view/SIP%20Testing/job/sipservlets. arquillian/lastSuccessfulBuild/artifact/documentation/html_single/index.html ● SipUnit Documentation: https://mobicents.ci.cloudbees. com/job/SipUnit/lastSuccessfulBuild/artifact/sipunit/docs/jdocbook- mobicents/target/docbook/publish/en-US/html_single/index.html