Skip to main content

机器人框架 JSON 验证器库

项目描述

构建状态

简短的介绍

基于 JSONSchema、JSONPath、JSONSelect 的 JSON 验证机器人框架库。

附加信息

安装

使用 pip 从 PyPI 安装库:

pip install robotframework-jsonvalidator

依赖项

文档

请参阅GitHub 上JsonValidator 库的关键字文档。

例子

json_example.json

{
  "store": {
    "book": [
      {
        "category": "reference",
        "author": "Nigel Rees",
        "title": "Sayings of the Century",
        "price": 8.95
      },
      {
        "category": "fiction",
        "author": "Evelyn Waugh",
        "title": "Sword of Honour",
        "price": 12.99
      },
      {
        "category": "fiction",
        "author": "Herman Melville",
        "title": "Moby Dick",
        "isbn": "0-553-21311-3",
        "price": 8.99
      },
      {
        "category": "fiction",
        "author": "J. R. R. Tolkien",
        "title": "The Lord of the Rings",
        "isbn": "0-395-19395-8",
        "price": 22.99
      }
    ],
    "bicycle": {
      "color": "red",
      "price": 19.95
    }
  }
}

机器人框架测试用例:

*** Settings ***
Library    JsonValidator
Library    OperatingSystem

*** Test Cases ***
Check Element
    ${json_example}=    OperatingSystem.Get File   ${CURDIR}${/}<s>json_example.json</s>
    Element should exist    ${json_example}    <s>.author:contains("Evelyn Waugh")</s>

执照

阿帕奇许可证 2.0

项目详情


下载文件

下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

robotsframework-jsonvalidator-2.0.0.tar.gz (6.7 kB 查看哈希

已上传 source

内置分布

robotsframework_jsonvalidator-2.0.0-py2.py3-none-any.whl (10.6 kB 查看哈希

已上传 py2 py3