2017 © Pedro Peláez
 

library marcspec-test-suite

A Testsuite for MARCspec parsers

image

ck/marcspec-test-suite

A Testsuite for MARCspec parsers

  • Tuesday, November 28, 2017
  • by collidoscope
  • Repository
  • 1 Watchers
  • 0 Stars
  • 198 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

MARCspec Test Suite

This repository contains a set of JSON objects that developers of MARCspec parser libraries can use to test their implementations., (*1)

Overview

Tests are divided into valid and invalid. Thus there are two directories valid/ and invalid/., (*2)

Each directory contains multiple .json files and each file contains one root JSON object with multiple test objects., (*3)

The filenames might give you a hint on which tests are covered. The files starting with wildCombination_ are (wild) combinations of the test data in the files starting with valid or invalid., (*4)

JSON structure

Each root JSON object contains an object with the description, a schema to validate against and some tests. Each test is an object itself with a description, the test data and a validation statement (true or false)., (*5)

Here is an example of teh content of a .json file, (*6)

{
    "description": "field tags are strings and match pattern",
    "schema": {
      "type": "string",
      "pattern": "^([.a-z0-9]{3,3}|[.A-Z0-9]{3,3})$"
    },
    "tests": [
        {
            "description": "all wildcards",
            "data": "...",
            "valid": true
        },
        {
            "description": "two wildcards left with digit",
            "data": "..0",
            "valid": true
        },
        {
            "description": "one wildcard left with two digits",
            "data": ".00",
            "valid": true
        }
    ]
}

About Tests

Not every file contains complete MARCspec references. Only the files starting with wildCombination_ and the files *FieldTag.json does., (*7)

The other files:, (*8)

  • *ComparisonString.json
  • *Indicators.json
  • *PositionOrRange.json
  • *SubfieldRange.json
  • *SubfieldTag.json
  • *SubSpec.json

contain either valid or invalid fragments of MARCspec references. This makes it easy to test distinct functionalities (e.g. a ComparisonString paser)., (*9)

The Versions

28/11 2017

dev-master

9999999-dev

A Testsuite for MARCspec parsers

  Sources   Download

MIT

The Requires

 

validator tests marc marcspec

28/11 2017

v0.3

0.3.0.0

A Testsuite for MARCspec parsers

  Sources   Download

MIT

The Requires

 

validator tests marc marcspec