小编Vya*_*lav的帖子

我可以在POSTMAN中将2维数组作为参数发送吗?

我需要在POSTMAN中将参数作为对象数组发送.

"array": [
    {"field1": "html", "field2": "5"},
    {"field1": "css", "field2": "3"}
 ]
Run Code Online (Sandbox Code Playgroud)

我知道数组必须发送为array[]但是如何将数组的一个项目设置为对象?

我试过这个

"array[]" : "{"field1": "html", "field2": "5"}" 
Run Code Online (Sandbox Code Playgroud)

但是我收到了500回复错误.

arrays postman

6
推荐指数
2
解决办法
1万
查看次数

如何在 Robot 框架中用 2 行代码编写代码

同事!

有时我在代码中有一个很长的字符串,例如一个字符串中有超过 200 个符号。

我可以在 Robot Framework 代码中对新行进行一些跟踪吗?

感谢您的关注!

robotframework

4
推荐指数
1
解决办法
2842
查看次数

POSTMAN返回模式验证测试失败

我有一个示例回复:

{
  "tags": [
    {
      "id": 1,
      "name": "[String]",
      "user_id": 1,
      "created_at": "2016-12-20T15:50:37.000Z",
      "updated_at": "2016-12-20T15:50:37.000Z",
      "deleted_at": null
    }
  ]
}
Run Code Online (Sandbox Code Playgroud)

我已经为响应写了一个测试:

var schema = {
    "type": "object",
    "properties": {
        "tags": {
            "type": "object",
            "properties": {
                "id": { "type": "integer" },
                "name": { "type": "string" },
                "user_id": { "type": "number" },
                "created_at": { "type": "string" },
                "updated_at": { "type": "string" },
                "deleted_at": { "type": ["string", "null"] }
            }
        }
    }
};
var data = JSON.parse(responseBody);

tests["Valid schema"] = tv4.validate(data, schema);
Run Code Online (Sandbox Code Playgroud)

此测试返回[FAIL].测试中有什么错误? …

schema json postman tv4

2
推荐指数
1
解决办法
4280
查看次数

标签 统计

postman ×2

arrays ×1

json ×1

robotframework ×1

schema ×1

tv4 ×1