Schema: robos:TestExecutionRecord

Formal W3C SHACL constraint shape and OSLC JSON-LD specification for robos:TestExecutionRecord in the testing package store.

Table of contents

  1. Specification Metadata
  2. Upstream Schema Basis (Refers From) & Global Standards Provenance
  3. Entity Relationship & Schema Context
  4. Property Constraints & SHACL Rules
  5. Canonical OSLC JSON-LD Example
  6. Programmatic SHACL Validation

Specification Metadata


Upstream Schema Basis (Refers From) & Global Standards Provenance

This RobOS schema is modeled after and directly aligns with two levels of global standards:


Entity Relationship & Schema Context

Test Execution Record robos:TestExecutionRecord

Governed by W3C SHACL shape urn:robos:shape:TestExecutionRecordShape within the Testing, Quality & BDD (robos.testing) (robos.testing) package store.

dcterms:title oslc_qm:executionStatus oslc_qm:reportsOnTestCase

Property Constraints & SHACL Rules

Property Path Name Multiplicity Data Type Constraint Rule / Validation Message
dcterms:title Title / Display Name 1..* xsd:string Test Execution Record must have a title.
oslc_qm:executionStatus Execution Status 1..* xsd:string Test Execution Record must declare execution status (PASS, FAIL, BLOCKED, SKIPPED).
oslc_qm:reportsOnTestCase Reports On Test Case 1..* URI (robos:Scenario | oslc_qm:TestCase) Test Execution Record must link to target test case or scenario.

Canonical OSLC JSON-LD Example

{
  "@id": "urn:robos:test-exec:checkout-standard-items-latest",
  "@type": [
    "robos:TestExecutionRecord",
    "oslc_qm:TestExecutionRecord",
    "schema:AssessAction"
  ],
  "dcterms:title": "Latest Execution: Successful checkout with in-stock items",
  "oslc_qm:executionStatus": "PASS",
  "oslc_qm:reportsOnTestCase": "urn:robos:scenario:checkout-standard-items",
  "robos:testFramework": "cucumber",
  "robos:durationMs": 420,
  "robos:executedAt": "2026-09-08T12:00:00Z",
  "robos:inTestSuite": "urn:robos:test-suite:billing-api-bdd",
  "robos:package": "testing",
  "robos:namespace": "robos.testing",
  "robos:refersFrom": "http://open-services.net/ns/qm#TestExecutionRecord",
  "robos:schemaOrgType": "https://schema.org/AssessAction",
  "robos:domainStandard": "http://open-services.net/ns/qm#TestExecutionRecord"
}

Programmatic SHACL Validation

const { SHACLValidator } = require('/usr/local/share/robos/robos-graph/lib/shacl-validator');
const { OSLCGraphParser, OSLC_CONTEXT } = require('/usr/local/share/robos/robos-graph/lib/oslc-parser');

const validator = new SHACLValidator();
const result = validator.validateGraph(new OSLCGraphParser({
  "@context": OSLC_CONTEXT,
  "robos:nodes": [
    {
        "@id": "urn:robos:test-exec:checkout-standard-items-latest",
        "@type": [
            "robos:TestExecutionRecord",
            "oslc_qm:TestExecutionRecord",
            "schema:AssessAction"
        ],
        "dcterms:title": "Latest Execution: Successful checkout with in-stock items",
        "oslc_qm:executionStatus": "PASS",
        "oslc_qm:reportsOnTestCase": "urn:robos:scenario:checkout-standard-items",
        "robos:testFramework": "cucumber",
        "robos:durationMs": 420,
        "robos:executedAt": "2026-09-08T12:00:00Z",
        "robos:inTestSuite": "urn:robos:test-suite:billing-api-bdd",
        "robos:package": "testing",
        "robos:namespace": "robos.testing",
        "robos:refersFrom": "http://open-services.net/ns/qm#TestExecutionRecord",
        "robos:schemaOrgType": "https://schema.org/AssessAction",
        "robos:domainStandard": "http://open-services.net/ns/qm#TestExecutionRecord"
    }
  ],
}));

console.log("Conforms:", result.conforms); // Expected: true