Skip to content

Define test case specification #1

@tatsuhiro-t

Description

@tatsuhiro-t

First things first, we have to define test case specification. Just inheriting the history of our test cases repository, I'd like to use JSON as representation language.

Here is my first idea for the test specification.

Test specification is described per file, and each file includes one JSON array, which contains an objects which specifies a single test case. Unlike HPACK test cases, encoding/decoding cache digest are done per frame. Although, it may have some flags to indicate the additional cache digests which belong to the same origin, they are separately encoded using possibly different parameters.

The each object at least should contain the following fields:

  • name: name of this test case, which can identify this test case among the same file. This must be JSON string.
  • pbits: the number of bits for P parameter. This must be JSON number. This should be in range of [0, 31], inclusive.
  • uris: this is JSON array containing URI to include in cache digest. URI must be non-empty JSON string.
  • wire: hex string of encoded cache digest using 1 << pbits as P, and URIs in uris. This includes CACHE_DIGEST payload only. This must be JSON string. The alphabets should be upper cased.

The example JSON file looks like this:

[
  {
    "name": "simple test case 1",
    "pbits": 7,
    "uris": [
      "https://example.com/style.css",
      "https://example.com/jquery.js"
    ],
    "wire": "09D650E0"
  },
  {
    "name": "simple test case 2",
    "pbits": 31,
    "uris": [
      "https://example.com/style.css",
      "https://example.com/jquery.js"
    ],
    "wire": "0FD64FBEEDB10F7E2020"
  }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions