|
| 1 | +--- |
| 2 | +title: Sovereign Cloud Standards Testing |
| 3 | +type: Procedural |
| 4 | +status: Draft |
| 5 | +track: Global |
| 6 | +replaces: |
| 7 | +- scs-0003-v1-sovereign-cloud-standards-yaml.md |
| 8 | +description: | |
| 9 | + SCS-0003 defines concepts central to testing SCS standards and regulates how results may |
| 10 | + be obtained and aggregated. |
| 11 | +--- |
| 12 | + |
| 13 | +## Introduction |
| 14 | + |
| 15 | +This standard defines concepts central to testing SCS standards and regulates how results may |
| 16 | +be obtained and aggregated. |
| 17 | + |
| 18 | +## Concept definitions |
| 19 | + |
| 20 | +A standard can be viewed as a collection of propositions that "must" (or "should") be satisfied |
| 21 | +by a test subject (cloud or cluster). The standard is satisfied if all "must" propositions are |
| 22 | +satisfied. |
| 23 | + |
| 24 | +A _testcase_ is a collection of propositions that coincide with respect to the following properties: |
| 25 | + |
| 26 | +- whether they can be tested automatically with normal user permissions; |
| 27 | +- how often they need to be tested (daily, weekly, monthly, annually); |
| 28 | +- whether they are required ("must"). |
| 29 | + |
| 30 | +We unambiguously refer to a testcase using a composite identifier consisting of two parts: |
| 31 | + |
| 32 | +- the _scope_: in the context of this standard, just an identifier of a namespace; |
| 33 | + for example: `scs-compatible-iaas` (or a UUID) |
| 34 | +- the _testcase id_, for example `scs-0100-syntax-check` or `scs-0101-fips-test`. |
| 35 | + |
| 36 | +The scope part is usually clear from the context and therefore omitted. |
| 37 | + |
| 38 | +A _test_ is a testcase or a collection of tests. We refer to a test using the same kind of |
| 39 | +composite identifier as for a testcase. |
| 40 | + |
| 41 | +For instance, if we have testcases `scs-0100-syntax-check` and `scs-0100-semantics-check`, |
| 42 | +we could define the test `scs-0100-v3` as the collection consisting of these two testcases. |
| 43 | +Given further tests `scs-0101-v1`, `scs-0102-v1` etc., we could define the test `scs-0501-v4` |
| 44 | +as the collection consisting of `scs-0100-v3`, `scs-0101-v1`, `scs-0102-v1` etc. |
| 45 | + |
| 46 | +A test can be viewed as a collection of propositions; namely, all propositions of all testcases |
| 47 | +that are part of the test. |
| 48 | + |
| 49 | +The _result_ of a test is one of the following values: |
| 50 | + |
| 51 | +- `FAIL`: it could be verified that at least one of its propositions is not satisfied; |
| 52 | +- `MISS` (missing): for at least one of its propositions, it was not (recently) attempted to verify it; |
| 53 | +- `DNF` (did not finish): for at least one of its propositions, it could not be verified whether it is satisfied; |
| 54 | +- `PASS`: it could be verified that all its propositions are satisfied. |
| 55 | + |
| 56 | +If multiple items apply, we always opt for the topmost one. |
| 57 | + |
| 58 | +A _test report_ is a data structure that contains the following information: |
| 59 | + |
| 60 | +- UUID, |
| 61 | +- Subject: the name of the test subject, |
| 62 | +- Scope: the scope of all the testcases referred to in this score card, |
| 63 | +- Creator: who created the report (name of person or version of the software), |
| 64 | +- Check date: when the test was performed, |
| 65 | +- Test results: a mapping that maps testcase ids to results. |
| 66 | +- Log: free-form text that details the test run. |
| 67 | + |
| 68 | +A _check script_ is a computer program that tests one or more testcases and produces a test report. |
| 69 | + |
| 70 | +A _score card_ is a data structure that contains the following information: |
| 71 | + |
| 72 | +- Subject: the name of the test subject, |
| 73 | +- Scope: the scope of all the testcases referred to in this score card, |
| 74 | +- Results: a mapping that maps testcase ids to results, where each result is additionally |
| 75 | + equipped with validity timespan (beginning at the time of the check and expiring according to |
| 76 | + the lifetime of the result). |
| 77 | + |
| 78 | +## Regulation |
| 79 | + |
| 80 | +Each standard must be decomposed into testcases. Each testcase should be "atomic" in the following two senses: |
| 81 | + |
| 82 | +- it's clear what specific part of the standard is satisfied or not satisfied; |
| 83 | +- the testcase can be reused for multiple versions of the standards. |
| 84 | + |
| 85 | +The latter criterion is a matter of engineering judgment, because it cannot be known in advance how a standard might evolve. |
| 86 | + |
| 87 | +Each testcase id must be prefixed by `scs-XXXX-` where `XXXX` is the document id of the standard; an exception is possible in the rare case when a testcase applies to multiple standards. |
| 88 | + |
| 89 | +A check script that can test multiple testcases should provide the option to select which testcases to run. |
| 90 | + |
| 91 | +A list of reports from a certain time frame can be merged into an aggregate score card, provided that the following conditions are satisfied: |
| 92 | + |
| 93 | +- for each testcase, the result must be taken from the most recent report containing that testcase, |
| 94 | +- if an additional report from the same time frame is known to exist, all its testcases must be contained in more recent reports from the list. |
0 commit comments