Skip to content
This repository has been archived by the owner on Sep 22, 2020. It is now read-only.

Client Test Cases

michelleflai edited this page Jan 17, 2014 · 13 revisions

###Framing Tests

1. DATA Frame Status
1.1 Client sends DATA frame to server, server validate frame format (i.e. Frame Type = 0x0, stream id = non-zero/odd number)
1.2 Client sends DATA frame with payload size > 0
1.3 Client sends DATA frame with no payload
1.4 Client sends DATA frame with max payload
1.5 Client receives DATA frame with length < payload size, expect FRAME_SIZE_ERROR
1.6 Client receives DATA frame with length > payload size, expect FRAME_SIZE_ERROR
1.7 Client receives DATA frame with zero stream id, expect PROTOCOL_ERROR
1.8 Client receives DATA frame size > max size, expect FRAME_SIZE_ERROR error
1.9 Client ignores DATA frame received with invalid flag
2. HEADERS Frame
2.1 Client sends HEADERS frame to server, server validate frame format (i.e. Frame Type = 0x1, stream id = non-zero/odd number)
2.2 Client sends HEADERS frame to server, server validate header fields (i.e. compressed correctly, lowercase names, no empty/duplicate names, no empty values, includes ":method", ":scheme", ":authority", ":path" mandatory header fields with valid value, not include Connection, Keep-Alive, Proxy-Connection, TE, Transfer-Encoding, and Upgrade header fields)
2.2 Client receives HEADERS frame without header block
2.3 Client receives HEADERS frame without priority
2.4 Client receives HEADERS frame without priority and header block
2.5 Client receives HEADERS frame with length < payload size, expect FRAME_SIZE_ERROR error
2.6 Client ignores HEADERS frame received with invalid flag
2.7 Client not accepts malformed HEADERS frame with uppercase header and end the stream
2.8 Client not accepts malformed HEADERS frame with empty header name and end the stream
2.9 Client not accepts malformed HEADERS frame with empty header value and end the stream
2.10 Client not accepts malformed HEADERS frame with duplicate header names and end the stream
2.11 Client not accepts malformed HEADERS frame with no ":status" header and end the stream
2.12 Client not accepts malformed HEADERS frame with bad zlib data and end the stream
2.13 Client accepts HEADERS frame with "set-cookie" header with either a comma-separated list or single concatenated value
3. PRIORITY Frame
3.1 Client sends PRIORITY frame to server, server validate frame format (I.e. Frame Type = 0x2, stream id = non-zero/odd number, zero flag, Priority value is within range (0 to 2^31-1))
3.2 Client sends PRIORITY frame with zero priority
3.3 Client sends PRIORITY frame with lowest priority
3.4 Client receives PRIORITY frame with zero stream id, expect PROTOCOL_ERROR
3.5 Client ignores PRIORITY frame received with invalid flag
4. RST_STREAM Frame
4.1 Client sends RST_STREAM frame to server, server validate frame format
4.2 Client receives RST_STREAM frame with non-zero stream id, expect PROTOCOL_ERROR
4.3 Client ignores RST_STREAM frame received with unknown error code
4.4 Client ignores RST_STREAM frame received with invalid flag
4.5 Client receives RST_STREAM frame with stream id in the idle state, expect PROTOCOL_ERROR
5. SETTINGS Frame
5.1 Client sends SETTINGS frame to server, server validate frame format
5.2 Client sends SETTINGS frame with ACK
5.3 Client sends SETTINGS frame with zero SETTINGS_MAX_CONCURRENT_STREAMS value
5.4 Client receives SETTINGS frame with no payload, expect PROTOCOL_ERROR
5.5 Client receives SETTINGS frame with non-zero stream id, expect PROTOCOL_ERROR
5.6 Client ignores SETTINGS frame received with invalid setting id
5.7 Client receives SETTINGS frame with ACK and payload, expect FRAME_SIZE_ERROR
5.8 Client receives SETTINGS frame with missing value, expect FRAME_SIZE_ERROR
5.9 Client ignores SETTINGS frame received with invalid flag
6. PUSH_PROMISE Frame
6.1 Client receives PUSH_PROMISE frame with zero stream id, expect PROTOCOL_ERROR
6.2 Client ignores PUSH_PROMISE frame with invalid flag
7. PING Frame
7.1 Client sends PING frame to server, server validate frame format
7.2 Client sends PING frame to server with ACK
7.3 Client receives PING frame with length > 8, expect FRAME_SIZE_ERROR
7.4 Client receives PING frame with length < 8, expect FRAME_SIZE_ERROR
7.5 Client receives PING frame with non-zero stream id, expect PROTOCOL_ERROR
7.6 Client ignores PING frame received with invalid flag
8. GOAWAY Frame
8.1 Client sends GOAWAY frame to server, server validate frame format
8.2 Client sends GOAWAY frame with no debug data
8.3 Client sends GOAWAY frame with zero last-stream-id
8.4 Client receives GOAWAY frame with incorrect Last-Stream-Id
8.5 Client receives GOAWAY frame with unknown error code
8.6 Client ignores GOAWAY frame received with invalid flag
8.7 Client receives GOAWAY frame with non-zero Stream Id
8.8 Client receives GOAWAY frame with missing Last-Stream-Id
8.9 Client receives GOAWAY frame with missing error code
9. WINDOW_UPDATE Frame
9.1 Client sends WINDOW_UPDATE frame to server, server validate frame format
9.2 Client sends WINDOW_UPDATE frame with minimum size
9.3 Client sends WINDOW_UPDATE frame with max size
9.4 Client sends WINDOW_UPDATE frame with zero stream id
9.5 Client sends WINDOW_UPDATE frame with non-zero stream id
9.6 Client ignores WINDOW_UPDATE frame received with invalid flag
9.7 Client receives WINDOW_UPDATE frame with invalid size
9.8 Client receives WINDOW_UPDATE frame with no payload
9.9 Client receives WINDOW_UPDATE frame with payload > 4 bytes
10. CONTINUATION Frame
10.1 Client sends CONTINUATION frame to server, server validate frame format
10.2 Client sends CONTINUATION frame with END_HEADERS flag
10.3 Client receives CONTINUATION frame with zero stream id, expect PROTOCOL_ERROR
10.4 Client ignores CONTINUATION frame received with invalid flag
10.5 Client receives CONTINUATION frame with no payload
11. Malformed Frame
11.1 Client ignores frame received with unknown frame type
11.2 Client ignores frame received with non-zero reserve bit
11.3 Client ignores frame received with without stream id

###Framing Tests

1. Test cases Status
1.1 Stream push_promise after data received
1.2 Server stream with odd stream id
1.3 Decreasing stream id
1.4 Duplicate stream id
1.5 DATA after RST_STREAM
1.6 FLOW_CONTROL_ERROR after bad WINDOW_UPDATE size
Clone this wiki locally