Skip to content
This repository has been archived by the owner on Feb 12, 2021. It is now read-only.
/ did-test-suite Public archive

The official test suite for the Decentralized Identifiers 1.0 specification

License

Notifications You must be signed in to change notification settings

w3c-ccg/did-test-suite

Repository files navigation

W3C Decentralized Identifiers Working Group Test Suite

This repository contains the W3C Credentials Community Group test suite. Any conforming implementation MUST pass all tests in the test suite.

There are multiple test suites, each of which is detailed below.

Decentralized Identifiers 1.0 Test Suite

This test suite will check any application that generates Decentralized Identifiers documents to ensure conformance with the specification.

Creating a Binary

You web application will need to be accessible from the command line. It will also need to accept the following command line parameters:

Usage: <your_program> [options] [command]

Options:
  -?, --question                         //TODO add commands
  -h, --help                             output usage information

Commands:
  validate 
    --did true|false
    --document true|false
    --contexts [path-to-context]

--did is used for validating identifiers. --document is used for validating documents --contexts is a list of paths to jsonld contexts used in the tests. Both did and document accept the tested object via stdin.

All tests will run against your binary and assume that an exit code greater than 0 represents an error.

Creating a Config File

An example local configuration for the test suite. To use:

  1. Copy the file config.json.example to a new file called config.json.
  2. Modify the file and replace with appropriate values for your system.
{
  "generator": "../your-application/bin",
  "baseDIDContext": "../path/to/base/context/did.json"
}

baseDIDContext is the path to the test suite's test/contexts/base.json file.

Running the Test Suite

  1. npm install
  2. Copy the config.json.example file to config.json and modify.
  3. All that is needed is a path to the binary that runs the tests
  4. npm test

Submit an Implementation Report

  1. npm install
  2. Copy the config.json.example file to config.json and modify.
  3. npm run report
  4. Rename implementation/results.json to implementation/YOUR_IMPLEMENTATION-results.json.
  5. git add implementations/YOUR_IMPLEMENTATION-results.json and submit a pull request for your implementation.

Contributing

You may contribute to this test suite by submitting pull requests here:

https://github.com/w3c-ccg/did-test-suite

About

The official test suite for the Decentralized Identifiers 1.0 specification

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published