When create a new test using API (following your guideline - Full API Documentation (Version 2) - PractiTest ) the test is successfully created but contains no steps (there should be one). My JSON:
{
"data": {
"type": "tests",
"attributes": {
"name": "Test_api_2",
"author-id": 9197,
"description": "test description",
"steps": {
"data": [ {"name": "step one", "description": "Step 1 description", "expected-results": "result"} ]
}
}
}
}
Is there something missing in my JSON? Thanks.
Hi,
We did not detect anything missing in your JSON.
Please send us a link to test that was created but doesn’t include steps and we will check it.
Thanks
JurajI
June 1, 2017, 11:56am
4
My JSON (as well as your example) was not correct. ‘steps’ should be on the same level as ‘attributes’ (data/attributes and data/steps).
Fixed JSON:
{
"data": {
"type": "tests",
"attributes": {
"name": "TestForPractiTest2",
"author-id": 9197,
"description": "This test should contain one step, but does not..."
},
"steps": {
"data": [ {"name": "Step 1 name", "description": "Step 1 description", "expected-results": "Step 1 result"} ]
}
}
}
Yes, you are right.
We will revise the documentation accordingly.
Apologies for the inconvenience.
Hi,
The documentation is revised accordingly.
Thanks again for letting us know!