Skip to main content

Testing Your Implementation

Validate your UNTP Textiles Extension credentials to ensure they're technically valid, semantically correct, and interoperable.

Overview

Testing your UNTP Textiles Extension implementation ensures your credentials can be verified and trusted by other systems in the UNTP ecosystem. This guide helps you understand what to test, how to test it, and which tools to use based on your implementation needs.

For authoritative testing guidance and detailed documentation, refer to the UNTP Test Suite documentation.

Testing Tiers

The UNTP uses a 3-tier testing approach:

TierWhat it testsTools
Tier 1W3C Verifiable Credential complianceUNTP Playground, UNTP Test Suite CLI
Tier 2UNTP + Textiles schema complianceUNTP Playground, UNTP Test Suite CLI
Tier 3Trust graph integrity(Future)

For Textiles Extension credentials, you must pass Tier 1 and Tier 2. Tier 3 is optional.

What to Test Based on Your Implementation

The credentials you need to test depend on what you're implementing:

If You're Implementing Digital Product Passports (DPP)

Test: Your DPP credentials must validate against:

  • Tier 1: W3C Verifiable Credential requirements
  • Tier 2: UNTP DPP core schema + Textiles Extension schema (if applicable)

Examples: Digital Cotton Passport

If You're Implementing Digital Conformity Credentials (DCC)

Test: Your DCC credentials must validate against:

  • Tier 1: W3C Verifiable Credential requirements
  • Tier 2: UNTP DCC core schema + Textiles Extension schema (if applicable)

Examples: Transaction Certificate

If You're Implementing Digital Traceability Events (DTE)

Test: Your DTE credentials must validate against:

  • Tier 1: W3C Verifiable Credential requirements
  • Tier 2: UNTP DTE core schema + Textiles Extension schema (if applicable)

If You're Implementing Digital Facility Records (DFR)

Test: Your DFR credentials must validate against:

  • Tier 1: W3C Verifiable Credential requirements
  • Tier 2: UNTP DFR core schema + Textiles Extension schema (if applicable)

Examples: Digital Cotton Facility Record

Testing Methods

Best for: Quick validation, manual testing, learning the validation process

What it tests: Tier 1 and Tier 2 automatically

Steps:

  1. Go to UNTP Playground
  2. Upload your signed credential JSON file
  3. Review validation results for Tier 1 and Tier 2
  4. Fix any errors and re-test
tip

The UNTP Playground validates both Tier 1 and Tier 2 automatically. This is the fastest way to verify your credentials when getting started.

Method 2: UNTP Test Suite CLI

Best for: Automated testing, CI/CD integration, batch validation, detailed conformance reports

What it tests: Tier 1 and Tier 2 with configurable options

Installation and usage: See the UNTP Test Suite CLI documentation

Key features:

  • Command-line interface for automated validation
  • Configurable test execution
  • Detailed conformance reports
  • Integration with development workflows

Method 3: UNTP Test Suite Library

Best for: Programmatic integration, custom validation workflows, building your own tools

What it tests: Tier 1 and Tier 2 programmatically

Usage: See the UNTP Test Suite documentation for library integration details

Quick Start Guide for New Developers

Follow these steps to validate your first credential:

Step 1: Prepare Your Credential

Ensure your credential is:

  • A valid JSON file
  • Signed with a valid cryptographic proof
  • Includes required @context URLs
  • Has a valid issuer.id (DID)

Step 2: Test in UNTP Playground

  1. Go to https://test.uncefact.org/untp-playground
  2. Upload your credential JSON file or paste the JSON directly
  3. Review the results:
    • Technical Interoperability (Tier 1) should show ✅ PASS
    • Semantic Interoperability (Tier 2) should show ✅ PASS

Step 3: Fix Any Issues

If validation fails:

  • Review the error messages in the playground
  • Check the Common Issues sections
  • Fix the issues and re-test

Step 4: Test Sample Credentials

Validate your testing setup by testing our sample credentials:

  • Sample credentials: /schema/example/ (served from static/schema/example/)
  • These are signed with: did:web:un.opensource.unicc.org:unece:uncefact:spec-unttp:acme
  • Download and test them in the playground to see what passing credentials look like

Step 5: Set Up Automated Testing (Optional)

For ongoing validation and CI/CD integration:

  1. Install the UNTP Test Suite CLI
  2. Configure it for your development workflow
  3. Integrate into your testing pipeline

Tier Details

Tier 1: Technical Interoperability

Validates that your credential is a valid, cryptographically verifiable W3C Verifiable Credential.

Validates: JSON-LD structure, cryptographic proof, DID resolution, temporal validity

Without passing Tier 1, your credential cannot be trusted regardless of its content.

Learn more →

Tier 2: Semantic Interoperability

Validates that your credential contains the right data in the right format according to UNTP and Textiles Extension schemas.

Validates: UNTP core schema compliance, Textiles Extension schema compliance, required fields, field types and formats

A credential can pass Tier 1 (valid VC) but fail Tier 2 (wrong structure).

Learn more →

Tier 3: Trust Graph Validation

Validates the integrity of the trust graph - ensuring credentials reference valid issuers, certifications, and traceability events.

Currently optional - will become more important as the UNTP ecosystem matures.

Official Testing Documentation

For comprehensive testing guidance, detailed API documentation, and advanced use cases: