承接 ck/marcspec-test-suite 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ck/marcspec-test-suite

最新稳定版本:v0.3

Composer 安装命令:

composer require ck/marcspec-test-suite

包简介

A Testsuite for MARCspec parsers

README 文档

README

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

Overview

Tests are divided into valid and invalid. Thus there are two directories valid/ and invalid/.

Each directory contains multiple .json files and each file contains one root JSON object with multiple test objects.

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.

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).

Here is an example of teh content of a .json file

{
    "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.

The other files:

  • *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).

统计信息

  • 总下载量: 278
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-06-01