Latka (Version 1.0 Alpha 1)
Latka is a functional (end-to-end) testing tool. It is implemented in Java, and uses an XML syntax to define a series of HTTP (or HTTPS) requests and a set of validations used to verify that the request was processed correctly.
Although Latka currently supports only HTTP and HTTPS request/response validations, it may be expanded to perform other sorts of functional testing as warranted.A simple example of a Latka XML test suite is shown in A Sample Latka Test Suite. When processed, this example would verify that the Jakarta Commons homepage is present and that all the Commons Components have online documenation.
Requirements
General installation
Optional web application installation
Command-line interface
Web application
(More to come...) Examine the Latka DTD in the conf directory for a list of all available elements. See the samples for typical syntax.
Command-line interface
Web application
(More to come...)
Table of Contents
<!ELEMENT byteLength EMPTY> <!ATTLIST byteLength min CDATA "0" max CDATA #IMPLIED label CDATA #IMPLIED>
Name | Type | Default | Description |
---|---|---|---|
min | NUMBER | 0 | Minimum number of bytes required for a valid response. Implied. Defaults to 0. |
max | NUMBER | none | Maximum number of bytes required for a valid response. Optional. When absent, there is no upper limit on the number of bytes in a valid response. |
label | CDATA | none | Label associated with this validation, which may be used in programatically generated documentation or reports. Optional. |
<!ELEMENT cookie EMPTY> <!ATTLIST cookie name CDATA #REQUIRED value CDATA #IMPLIED label CDATA #IMPLIED>
Name | Type | Default | Description |
---|---|---|---|
name | CDATA | none, but required | The name of the cookie to look for. Required. |
value | CDATA | none, optional | The value that the cookie with the specified name should have (if any). |
label | CDATA | none | Label associated with this validation, which may be used in programatically generated documentation or reports. Optional. |
<!ELEMENT maxRequestTime EMPTY> <!ATTLIST maxRequestTime millis CDATA "30000" message CDATA #IMPLIED>
Name | Type | Default | Description |
---|---|---|---|
millis | NUMBER | 30000 | Maximum amount of time, in milliseconds, in which a response must be returned to be considered a valid response. Implied. Defaults to 30000 milliseconds, or 30 seconds. |
label | CDATA | none | Label associated with this validation, which may be used in programatically generated documentation or reports. Optional. |
<!ELEMENT regexp EMPTY> <!ATTLIST regexp pattern CDATA #REQUIRED cond (true | false) "true" ignoreCase (true | false) "false" label CDATA #IMPLIED>
Name | Type | Default | Description | ||
---|---|---|---|---|---|
pattern | CDATA | none, but required. | The regular expression to look for. | ||
cond | Enumeration:
| true | When true, the given pattern must match within the response. When false, the given pattern must not match within the response. | ||
ignoreCase | Enumeration:
| false | When true, case is ignored within the given pattern. | ||
label | CDATA | none | Label associated with this validation, which may be used in programatically generated documentation or reports. Optional. |
<!ELEMENT request (credentials?, param*, validate?)> <!ATTLIST request path CDATA #REQUIRED method (post | get) "get" host CDATA #IMPLIED port CDATA #IMPLIED label CDATA #IMPLIED>
Name | Type | Default | Description | ||
---|---|---|---|---|---|
path | CDATA | none, but required | Request path. Required. | ||
method | enumeration:
| get | HTTP method. Implied. Defaults to get. | ||
host | CDATA | none | Host to submit request to. Optional. When absent, uses default from suite. | ||
port | NUMBER | depends upon protocol | Port to submit request to. Optional. When absent, uses default from suite. | ||
label | CDATA | none | Label associated with this validation, which may be used in programatically generated documentation or reports. Optional. |
Name | Type | Default | Description |
---|---|---|---|
sessionId | CDATA | none | Unique identifier for this session. Sessions with the same sessionId will share the same underlying state (e.g., cookies, etc.) |
label | CDATA | none | Label associated with this session, which may be used in programatically generated documentation or reports. Optional. |