Media/WebRTC/Testing: Difference between revisions

From MozillaWiki
< Media‎ | WebRTC
Jump to navigation Jump to search
Line 47: Line 47:
Currently we have the following tests:
Currently we have the following tests:


==== Mtransport ====
==== media/mtransport/test ====


sockettransportservice_unittest &mdash; tests various uses of the Socket Transport Service
* sockettransportservice_unittest &mdash; tests various uses of the Socket Transport Service
nrappkit_unittest &mdash; tests Mozilla implementations of the nrappkit primitives (needed for ICE)
* nrappkit_unittest &mdash; tests Mozilla implementations of the nrappkit primitives (needed for ICE)
runnable_utils_unittest &mdash; tests the runnable utils in runnable_utils.h
* runnable_utils_unittest &mdash; tests the runnable utils in runnable_utils.h
turn_unittest &mdash; unit tests for TURN
* turn_unittest &mdash; unit tests for TURN
ice_unittest &mdash; overall tests for ICE
* ice_unittest &mdash; overall tests for ICE
sctp_unittest &mdash; tests for the SCTP code running on top of transport
* sctp_unittest &mdash; tests for the SCTP code running on top of transport
transport_unittests &mdash; system tests for the mtransport subsystem including the DTLS wrapper and ICE wrappers
* transport_unittests &mdash; system tests for the mtransport subsystem including the DTLS wrapper and ICE wrappers

Revision as of 23:31, 28 April 2013

WebRTC Test System

We currently test WebRTC with two sets of tests:

  • Standalone C++ unit and system tests.
  • Full system mochitests.


C++ Unit Tests

The WebRTC code has extensive C++ unit and system tests based on the Google Test (https://code.google.com/p/googletest/) framework. These tests live in two locations:

  • media/mtransport — the mtransport generic transport subsystem and associated utilities
  • media/webrtc/signaling/test — the signaling system and the media handling system

As usual, you can run them individually by doing:

  make -C <directory>

Alternately, you can run a single C++ unit test by name, e.g.,

  media/mtransport/test/ice_unittest

Tinderbox runs all the tests in a given directory but for a variety of reasons some of the tests aren't run on Tinderbox. This is controlled by requiring certain environment variables to be set.

A number of tests have been disabled on Tinderbox because they either take a long time or have excessive oranges. To enable these, set:

   MOZ_WEBRTC_TESTS=1


Additionally, the TURN tests require you to specify a TURN server. However, we don't provide one for Tinderbox because we don't want to operate a public server and releng hasn't set one up in the test environment yet ( https://bugzilla.mozilla.org/show_bug.cgi?id=865296)

If you have a TURN server, you can point the tests at it by setting:

   TURN_SERVER_ADDRESS
   TURN_SERVER_USER
   TURN_SERVER_PASSWORD


Currently we have the following tests:

media/mtransport/test

  • sockettransportservice_unittest — tests various uses of the Socket Transport Service
  • nrappkit_unittest — tests Mozilla implementations of the nrappkit primitives (needed for ICE)
  • runnable_utils_unittest — tests the runnable utils in runnable_utils.h
  • turn_unittest — unit tests for TURN
  • ice_unittest — overall tests for ICE
  • sctp_unittest — tests for the SCTP code running on top of transport
  • transport_unittests — system tests for the mtransport subsystem including the DTLS wrapper and ICE wrappers