Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Validation Scripts have historically produced a number of reports geared toward human consumption, but no report has existed that provided a full accounting of results in a machine readable format.  A file named failures was produced in the output directory, but it contained only a subset of information about the execution run.  The following proposal is to create a new file ( report.json ) that contains a full account of all available information.  It would be produced when the --report-format json option is passed to the pytest command, and would be suitable for consumption for tools such as VNFSDK or Dovetail as part of the certification program.

File Specification

File Header/Top Level
Anchor
header
header

The top level will include a summary of available execution metadata.

...

Field Name

Required/

Optional/

Conditional

DatatypeValid ValuesDescription
version
Requiredstring
Version of the validation scripts that produced the report.  For now, this is set to the ONAP release name, but it may change to a semantic version number in the future.
template_directory
Requiredstring
Absolute path of the directory containing the Heat templates that were validated
timestamp
Requiredstring
ISO 8601 Timestamp in UTC
checksum
Requiredstring
MD5 hash of all file contents in the template_directory
profile
Requiredstring
Validation profile used to validate the templates.  In the default ONAP code base, this is always the empty string
outcome
Requiredstring

PASS

FAIL

ERROR

One of the valid values. 

  • PASS - All tests passed successfully (some may have been skipped as not applicable based on the contents of the template).
  • FAIL - At least one test failed a validation. In this scenario the templates will need to be corrected to comply with the requirements.
  • ERROR -  An unexpected error occurred during test setup. Some or all tests may have not executed.  Issue should be referred to the VNF Validation Program team for investigation.
tests
Requiredlist of Test Result
List of Test Result
requirementsRequiredlist of Requirement Result
List of Requirement Result


Test Result

For each test result a JSON object will be provided that informs the consumer what tests was run, its result, and the requirements it validated.

...

Field Name

Required/

Optional/

Conditional

DatatypeValid ValuesDescription
filesRequiredlist of string

List of files that were passed to the test case. 

NOTE: If result is ERROR than this may be an empty list.

test_module
Requiredstring
Name of the module/file name that contains the test case
test_case
Requiredstring
Name of the test case
result
Requiredstring

PASS

SKIP

FAIL

ERROR

One of the valid values. 

  • PASS - The test case passed with no violations or issues
  • SKIP - The test case was skipped because it was deemed not applicable
  • FAIL - The test case completed, but it found a violation
  • ERROR - An unexpected error was found while setting up the test case
error
Requiredstring
If the test failed or encountered an error, then this will be an message summarizing the error.  If the test passed or was skipped, then this will be an empty string
requirementsRequiredList of Requirement Metadata
A list of Requirement Metadata for each requirement this test case validates.  While uncommon, this can be an empty list in some circumstances.

...

Field Name

Required/

Optional/

Conditional

DatatypeValid ValuesDescription
idRequiredstring

Requirement ID from the VNFRQTS project

NOTE: a requirement ID of "Unmapped" may be included if one or more tests are not mapped to a requirement.  In this case, all test cases not mapped to are requirement will be rolled up to a single "Unmapped" requirement.

text
Requiredstring
Full text of the requirement.  This text may be multi-line, and it will
keyword
Requiredstring

MUST

MUST NOT

MAY

SHOULD

SHOULD NOT

RFC 2119 keyword associated with the requirement
result
Requiredstring

PASS

SKIP

FAIL

ERROR

One of the valid values. 

  • PASS - The test case passed with no violations or issues
  • SKIP - The test case was skipped because it was deemed not applicable
  • FAIL - The test case completed, but it found a violation
  • ERROR - An unexpected error was found while setting up the test case
errors
Requiredlist of string
Error messages associated with this requirement.  This will be an empty string if the result is PASS or SKIP

...