Subunit Describe Calls Utility

subunit-describe-calls is a parser for subunit streams to determine what REST API calls are made inside of a test and in what order they are called.

Runtime Arguments

–subunit, -s: (Required) The path to the subunit file being parsed

–non-subunit-name, -n: (Optional) The file_name that the logs are being stored in

–output-file, -o: (Required) The path where the JSON output will be written to

–ports, -p: (Optional) The path to a JSON file describing the ports being used by different services

Usage

subunit-describe-calls will take in a file path via the –subunit parameter which contains either a subunit v1 or v2 stream. This is then parsed checking for details contained in the file_bytes of the –non-subunit-name parameter (the default is pythonlogging which is what Tempest uses to store logs). By default the OpenStack Kilo release port defaults (http://bit.ly/22jpF5P) are used unless a file is provided via the –ports option. The resulting output is dumped in JSON output to the path provided in the –output-file option.

Ports file JSON structure

{
“<port number>”: “<name of service>”, …

}

Output file JSON structure

{
“full_test_name[with_id_and_tags]”: [
{
“name”: “The ClassName.MethodName that made the call”, “verb”: “HTTP Verb”, “service”: “Name of the service”, “url”: “A shortened version of the URL called”, “status_code”: “The status code of the response”

}

]

}