Re: Test message

Hi!

I wrote most of that test so I can make a short explanation of how it
works. You can find the code at
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/functional/webrtc_call.py?view=markup
 and
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/webrtc/.

The tests use a Chromium test framework called PyAuto. It basically allows
us to use the Chrome automation controller, which in turn allows us to open
tabs, go to web pages, click past confirmation dialogs and so on. You will
need something similar in your own browser, or perhaps some external
clickbot.

So, the test first launches a small server binary on localhost. The server
makes sure the participants (in this case, two tabs in one window) can find
each other and exchange SDP offers. You can use whatever signalling
solution you prefer here. Then the two tabs are opened and ordered through
javascript calls to connect to the server, exchange offers and initiate
media transfer. The media is sent to <video> tags on the web pages. We
analyze that video appears in the <video> tags using <canvas> elements. If
video appears within 30 seconds, we conclude that the test was successful.

I think you can certainly re-use the javascript and html code if you want
to. I'm not sure if the code for the small server is open sourced yet, but
it's really simple either way.

You can try out the tests if you check out chrome and then run

make chrome pyautolib peerconnection_server
../chrome/test/functional/webrtc_call.py

Let me know if you have any questions!

/ P


On Thu, Jul 19, 2012 at 11:08 AM, Harald Alvestrand <hta@google.com> wrote:

> The current chrome WebRTC integration tests live in
> src/chrome/test/functional in the Chromium source repository -
> webrtc_call.py is the starting point (or was when I went on vacation...)
>
> It may be entertaining to check it out!
>
>
> On Thu, Jul 19, 2012 at 11:16 AM, Odin Hørthe Omdal <odinho@opera.com>wrote:
>
>> On Wed, 18 Jul 2012 13:13:02 +0200, Harald Alvestrand <
>> harald@alvestrand.no> wrote:
>>
>>> Just testing that the list works for me. And because it's so quiet here!
>>>
>>
>> *crickets* ...
>>
>>
>>
>> No, it works :P
>>
>> So, tests for WebRTC is no straight forward thing to start on. And the
>> other testsuite mailing lists that have easier tests are not exactly run
>> down by people contributing and discussing tests either.
>>
>> I'm very interested in how people see us testing WebRTC though. I think
>> W3 can run Python in the common test repo, and for the client side "test"
>> it'd be very very benificial to use testharness.js. I would've thought we'd
>> need to build a server that you do setup and teardown via a HTTP interface,
>> and tell it what to do.
>>
>> Looking at the websocket tests may also be helpful, as they're also kinda
>> lowlevel. I haven't done any of that, I'm merely interested. :-)
>
>
>
>
>>
>> --
>> Odin Hørthe Omdal (Velmont/odinho) · Core, Opera Software,
>> http://opera.com
>>
>>
>

Received on Tuesday, 31 July 2012 14:29:01 UTC