test_case

A test case is the single unit of test that gets executed. Each test must have its own name defined and must be associated with a test group.

A test case can be associated with only one test group. A test case can also register multiple measurements.

A test case name must start and end with an alphanumeric character, and it must match the following regular expression: [a-zA-Z0-9.-_+]+

GET

{
    "$schema": "http://api.kernelci.org/json-schema/1.0/get_test_case.json",
    "id": "http://api.kernelci.org/json-schema/1.0/get_test_case.json",
    "title": "test_case",
    "description": "A test case JSON object as returned by the API",
    "type": "object",
    "properties": {
        "version": {
            "type": "string",
            "description": "The version number of this JSON schema",
            "enum": ["1.0"]
        },
        "_id": {
            "type": "object",
            "description": "The ID of ths object",
            "properties": {
                "$oid": {
                    "type": "string",
                    "description": "The actual ID value"
                }
            }
        },
        "name": {
            "type": "string",
            "description": "The name given to this test case"
        },
        "created_on": {
            "type": "object",
            "description": "Creation date of this test case in the database",
            "properties": {
                "$date": {
                    "type": "number",
                    "description": "Milliseconds from epoch time",
                    "format": "utc-millisec"
                }
            }
        },
        "test_group_id": {
            "type": "string",
            "description": "The test group ID associated with this test case"
        },
        "parameters": {
            "type": "object",
            "description": "Key-value pairs describing the parameters used to run the test case"
        },
        "status": {
            "type": "string",
            "description": "The status of the execution of this test case",
            "enum": ["PASS", "FAIL", "SKIP", "ERROR"],
            "default": "PASS"
        },
        "time": {
            "type": "number",
            "description": "The number of seconds it took to execute this test case",
            "default": -1
        },
        "definition_uri": {
            "type": "string",
            "description": "The URI where this test case definition is stored"
        },
        "vcs_commit": {
            "type": "string",
            "description": "The VCS commit value if the $definition_uri field is a VCS URI"
        },
        "kvm_guest": {
            "type": "string",
            "description": "The name of the KVM guest this test case has been executed on"
        },
        "metadata": {
            "type": "object",
            "description": "Free form object where accessory test case data is stored"
        },
        "measurements": {
            "type": "array",
            "description": "Array of measurement objects registered by this test case",
            "items": {"$ref": "http://api.kernelci.org/json-schema/1.0/measurement.json"},
            "additionalItems": true
        },
        "minimum": {
            "type": ["integer", "number"],
            "description": "The minimum measurement registered"
        },
        "maximum": {
            "type": ["integer", "number"],
            "description": "The maximum measurement registered"
        },
        "samples": {
            "type": "integer",
            "description": "Number of registered measurements"
        },
        "samples_sum": {
            "type": ["integer", "number"],
            "description": "Sum of the registered measurements"
        },
        "samples_sqr_sum": {
            "type": ["integer", "number"],
            "description": "Sum of the square of the registered measurements"
        },
        "attachments": {
            "type": "array",
            "description": "List of attachment objects produced by this test case",
            "items": {"$ref": "http://api.kernelci.org/json-schema/1.0/attachment.json"},
            "additionalItems": true
        }
    }
}

Notes

  • attachments: Each attachment referenced here, must be available at its specified URI or uploaded using the upload API.