The suites call on a set of common config files stored at ./config/.
./config/runner.jsonis for test suite specific configuration../config/vector.jsonis for test vector specific configuration.
The tests run a set of static test vectors configured by ./config/vectors.json..
The vectors are configured for each suite and contain a credentials section.
The initial ./config/vectors.json` is populated with defaults.
Credentials configuration consists of 3 properties:
createfor issuance or VC creation tests.verifyfor VC verification tests.- Some
verifysections contain multiple credentials and pointers for test data.
- Some
interopfor VC interoperability tests.
The test vector configuration consists of a version (either 1.1 or 2.0) and 1-3 paths to JSON objects:
- The property
documentis a path to an unsigned credential.documentis required by all tests.
- The property
mandatoryPointersis a path to a JSON array of pointers.mandatoryPointersare required only for selective disclosure tests.
- The property
selectivePointersis an array containing all pointers for a credential.- Pointers used in the tests are deduced from the full set of pointers.
selectivePointersare required only for selective disclosure tests.
Some credentials sections (such as the sd verify test) might require multiple test vectors. If multiple vectors are required, multiple named properties must be filled in in that section, in order for the tests to run.
Each vectors suite has an associated keyTypes property.
That property contains an array of keyTypes used to create verification test data.
Your implementation will only be tested against the supportedEcdsaKeyTypes specified
in your implementation manifest.
A minimal non-SD test vector configuration looks like this:
"verify": {
"1.1": {"document": "./test/input/vc-di-ecdsa/TestVectors/1.1/ecdsa-sd-2023/windDoc.json"},
"2.0": {"document": "./test/input/vc-di-ecdsa/TestVectors/2.0/ecdsa-sd-2023/windDoc.json"}
}An SD test vector configuration looks like this:
"create": {
"1.1": {
"document": "./mocks/valid/1.1/document.json",
"mandatoryPointers": "./mocks/valid/1.1/mandatoryPointers.json",
"selectivePointers": "./mocks/valid/1.1/selectivePointers.json"
},
"2.0": {
"document": "./mocks/valid/2.0/document.json",
"mandatoryPointers": "./mocks/valid/2.0/mandatoryPointers.json",
"selectivePointers": "./mocks/valid/2.0/selectivePointers.json"
}
}You can see the full config/vectors.json here
To generate interop test data used in the test suite, testers may specify
the holder name using the setting holderName in the ecdsa-sd-2023 section
of ./config/runner.json. This holder name will be used as the implementation name
when generating disclosed test credentials for interop ECDSA-SD tests.
If holderName is not specified, Digital Bazaar will be used.