PractiTest Discussion Forum

Is it possible to create more tests using one POST request?

Can I send more tests in one json? I tried several formats, but most likely I have my jsons in wrong format. E.g.:

[
  {
    "project_id": 3953,
    "author_id": 9197,
    "name": "MOBILE_A",
    "description": "using api..."
  },
  {
    "project_id": 3953,
    "author_id": 9197,
    "name": "MOBILE_B",
    "description": "using api..."
  }
]

Or

{"data":
  [
    {
      "project_id": 3953,
      "author_id": 9197,
      "name": "MOBILE_A",
      "description": "using api..."
    },
    {
      "project_id": 3953,
      "author_id": 9197,
      "name": "MOBILE_B",
      "description": "using api..."
    }
  ]
}

give the error: {“error”:“User was not found”}. With only one test in json everything works fine.

Thanks.

Hi Tomas,

No, it is not possible, but if you need to create multiple tests, you can do a “for loop”.

:wink: Thanks Christine.