As a test designer, I want to check the conformance of the query part of Request-URI of the HTTP message

Story status
To be reviewed
Implementation status
Planned
Targetted user
Description

Tips

Extract from RFC3986: The query component contains non-hierarchical data that, along with data in the path component, serves to identify a resource within the scope of the URI's scheme and naming authority (if any). The query component is indicated by the first question mark ("?") character and terminated by a number sign ("#") character or by the end of the URI.

query       = *( pchar / "/" / "?" )

The characters slash ("/") and question mark ("?") may represent data within the query component.

Query components are often used to carry identifying information in the form of "key=value" pairs and one frequently used value is a reference to another URI, it is  sometimes better for usability to avoid percent-encoding those characters.

Description

As a test designer,

  • if the specifications covered by the validation profiles define a query part in the Request-URI, I shall be able to write a set of rules to express those requirements.
  • I shall be able to list all the query parameters defined in the specifications.
  • I shall be able to tell the tool that the specifications profile does not allow unlisted query parameters to be used (closed list).
  • For each query parameter, I shall be able to
    • Give a name to the query parameter for sake of understandability and maintenance;
    • Define a key if appropriate;
    • Say whether the parameter is required, optional, or conditional;
    • Say whether the parameter is valued or not;
    • Say whether the parameter is repeatable or not and if there is an upper limit for the number of repetitions;
    • Say whether multiple values are allowed, and if yes what are the lower and upper limits for the number of repetitions;
    • Define the delimiter in case of multiple values;
  • When a parameter is valued, I shall be able to constrain the value with either
    • a fixed value;
    • a datatype;
    • a regular expression;
    • a reference to a value set the value shall come from;
    • a numeric range.
Acceptance criteria

V0.2

As a test designer, when I create a validation profile, I shall be able to constrain the query part of the Reference-URI. The Validation profile shall allow:

  • Giving a name to the parameter;
  • Fixing the value of the parameter key;
  • Giving a lower and upper limits for the number of allowed occurrences a given parameter key;
  • Giving a lower and upper limits for the number of allowed occurrences of the value of a given parameter;
  • Defining the value delimiter for multivalued a given parameter;
  • Constraining the parameter value to a fix string;
  • Constraining the parameter value to a regular expression.

VXX

For the query part of the Reference-URI, the validation profile shall allow:

  • Expressing conditional rules (like: this query parameter is forbidden if this header parameter is present)
  • When a parameter is valued, constraining the value with either
    • a fixed value;
    • a datatype;
    • a regular expression;
    • a reference to a value set the value shall come from;
    • a numeric range.