Re: [hybi] websocket test suite

Ahmed Soliman <asoliman@microsoft.com> Wed, 31 August 2011 21:32 UTC

Return-Path: <asoliman@microsoft.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 99F0021F8DC7 for <hybi@ietfa.amsl.com>; Wed, 31 Aug 2011 14:32:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.399
X-Spam-Level:
X-Spam-Status: No, score=-9.399 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, J_CHICKENPOX_14=0.6, J_CHICKENPOX_46=0.6, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0TCzUSOfrUf4 for <hybi@ietfa.amsl.com>; Wed, 31 Aug 2011 14:32:23 -0700 (PDT)
Received: from smtp.microsoft.com (mail3.microsoft.com [131.107.115.214]) by ietfa.amsl.com (Postfix) with ESMTP id DF6DF21F8DC6 for <hybi@ietf.org>; Wed, 31 Aug 2011 14:32:22 -0700 (PDT)
Received: from TK5EX14HUBC105.redmond.corp.microsoft.com (157.54.80.48) by TK5-EXGWY-E803.partners.extranet.microsoft.com (10.251.56.169) with Microsoft SMTP Server (TLS) id 8.2.176.0; Wed, 31 Aug 2011 14:33:54 -0700
Received: from TK5EX14MBXC139.redmond.corp.microsoft.com ([169.254.7.114]) by TK5EX14HUBC105.redmond.corp.microsoft.com ([157.54.80.48]) with mapi id 14.01.0323.007; Wed, 31 Aug 2011 14:33:54 -0700
From: Ahmed Soliman <asoliman@microsoft.com>
To: Ahmed Soliman <asoliman@microsoft.com>, Greg Wilkins <gregw@intalio.com>, Hybi <hybi@ietf.org>
Thread-Topic: [hybi] websocket test suite
Thread-Index: AQHMTYLTnPwMA5ROPUezUY2S/9CJVJUC93AAgAAeXwCAESfEIIAjcH9A
Date: Wed, 31 Aug 2011 21:33:53 +0000
Message-ID: <C2249F130C474040B449429C80C0BDC65C3CE326@TK5EX14MBXC139.redmond.corp.microsoft.com>
References: <CAH_y2NFBNU7fiWWBoc2NNG0irjkOp7JAwDuNcAj-M2nFrGpVaw@mail.gmail.com> <CABDh0KkxLLU1onDbiya_n2BAmyUBPkM1LS1PDn2_CHgnOWtpJg@mail.gmail.com> <CAH_y2NGV28EHRhPZpCFWJfjTcR0_BGCtYv2yj4p0JA+26hU9_w@mail.gmail.com> <C2249F130C474040B449429C80C0BDC65C36DF9A@TK5EX14MBXC133.redmond.corp.microsoft.com>
In-Reply-To: <C2249F130C474040B449429C80C0BDC65C36DF9A@TK5EX14MBXC133.redmond.corp.microsoft.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [157.54.51.71]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [hybi] websocket test suite
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 31 Aug 2011 21:32:23 -0000

Greg,

Are you still planning to add any of these scenarios to the jetty server?

-----Original Message-----
From: hybi-bounces@ietf.org [mailto:hybi-bounces@ietf.org] On Behalf Of Ahmed Soliman
Sent: Tuesday, August 09, 2011 2:45 AM
To: Greg Wilkins; Hybi
Subject: Re: [hybi] websocket test suite

Greg,

I have the following comments:
1. Scenario to add:
	* Receive/send control frames (e.g. close frame) within a fragmented message. Verify that client/server responds with a close frame.

2. Focusing on interoperability testing:  Shouldn't we narrow the tests below to focus on interoperability testing?  I think some of the negative tests below  fit better in functional testing rather than interoperability testing? What do you think? 
3. Standard process/test implementation: I think this will make it easier to share test implementations and verify interoperability between different protocol implementations. Any thoughts around this?
(e.g. cre ating server endpoints per scenario for server implementation,  using sub-protocol to select between fragmented message/non-fragmented message, .... etc)

Thanks,
Ahmed

-----Original Message-----
From: hybi-bounces@ietf.org [mailto:hybi-bounces@ietf.org] On Behalf Of Greg Wilkins
Sent: Thursday, July 28, 2011 8:15 PM
To: Hybi
Subject: Re: [hybi] websocket test suite

Here is a first cut at a list of tests for section 4 of the spec.  Are these the kinds of tests people were thinking about?
If so, then I'm happy to go the next step of detail and start providing more detail for each test.

Obviously some implementation are not going to be able to send some of the invalid frames or force fragmentation, so some suites will have to record some tests as skipped, or only testing in one direction etc.




4.2 Base Framing Tests
----------------------

* 7 bit length: send/receive frames of length 0-125
* 16 bit length: send/receive frames of length 126-128, 65536
* 63 bit length: send/receive frames of length 65537

* Non zero RSV: send frames with non zero reserved bits and no extension. Verify connection is failed.

* Known Opcodes: send/receive frames with text,binary,ping,pong opcodes (continuation & close tested separately).
* Unknown Opcodes: send frames with unknown opcodes 3-7, B-F. Verify connection is failed.


4.3 Client to Server Masking
----------------------------

???


4.4 Fragmentation
-----------------

* 1 fragment message: send/receive message in 1 fragment
* 2 fragment message: send/receive message in 2 fragments
* 3 fragment message: send/receive message in 3 fragments
* Injected control: send/receive 2 fragment message with unsolicited pong message between frames
* Fragmented control: send fragmented ping. Verify that connection is failed.
* Interleaved fragments: send a fragment with FIN set and Continuation opcode. Verify that connection is failed.
* Handled control: send/receive 2 fragment message with ping message between frames and last frame delayed. Verify pong is received before last frame is sent.
* 7 bit fragment: send/receive message with initial/middle/final fragments of sizes 0-125
* 16 bit fragment: send/receive message with initial/middle/final fragments of sizes 126-128,65536
* 64 bit fragment: send/receive message with initial/middle/finalfragments of size 65537


4.5.1 Close Frames
------------------
* Orderly Close: On an idle connection, send a close and receive a close.
* Busy Close: send a close to an endpoint that has sent the first fragment of a message.
* Simultaneous Close: send a close on both ends of a connection.
* Message after close: attempt to send a message after a close. Verify message is not received.
* Idle close: ??
* Error Close: ??


4.5.2 Ping
----------
* Empty ping: Send an empty ping, verify pong is received.
* Non empty ping: Send a non empty ping, verify pong is received.


4.5.3 Pong
----------
* Empty pong: Send an empty ping, verify pong is received and is empty.
* Non empty pong: Send a non empty ping, verify pong is received and has matching content.
* Outstanding ping: Send two pings with different content, reply with content for only the second. Verify connection stays open.
* Unsolicited pong: Send/recv unsolicited pong.


4.5.4 Data Frames
-----------------
* UTF-8 Text 0000-007f: Send/receive text message with characters in code point range  U+0000 to U+007F
* UTF-8 Text 0080-07ff: Send/receive text message with characters in code point range  U+0080 to U+07FF
* UTF-8 Text 0800-ffff: Send/receive text message with characters in code point range  U+0800 to U+FFFF
* UTF-8 Text 010000-10ffff: Send/receive text message with characters in code point range  U+010000 to U+10FFFF
* Illegal bytes UTF-8: Send message with invalid UTF-8 byte sequence.
Verify message is not received.
* Illegal codes UTF-8: Send message with invalid UTF-8 code points.
Verify message is not received.
* Binary frames: Send/receive message containing illegal UTF-8 bytes sequences and code points as binary message.
_______________________________________________
hybi mailing list
hybi@ietf.org
https://www.ietf.org/mailman/listinfo/hybi

_______________________________________________
hybi mailing list
hybi@ietf.org
https://www.ietf.org/mailman/listinfo/hybi