Skip to content

Commit 4b71d6c

Browse files
committed
POST /testcases
1 parent 354b953 commit 4b71d6c

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name":"Test Case BETA has STEPS",
3+
"testSuiteID":378,
4+
"testProjectID":358,
5+
"summary":"This is a summary for Test Case",
6+
"preconditions":"No preconditions",
7+
"order":100,
8+
"authorID":1,
9+
"importance":2,
10+
"executionType":1,
11+
"steps": [
12+
{ "step_number":1,
13+
"actions": "red",
14+
"expected_results": "#f00",
15+
"execution_type":1
16+
},
17+
{ "step_number":12,
18+
"actions": "red12",
19+
"expected_results": "#f00",
20+
"execution_type":2
21+
}
22+
]
23+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/sh
2+
# curl -i -X POST -u dev01:dev01 http://localhost/development/tlrepo/lib/api/rest/v1/testprojects
3+
# -i include headers
4+
# -X (HTTP) Specifies a custom request method to use when communicating with the HTTP server
5+
# -u user:password
6+
# --data If you start the data with the letter @, the rest should be a file name to read the data from,
7+
# or - if you want curl to read the data from stdin.
8+
# The contents of the file must already be URL-encoded.
9+
# Multiple files can also be specified.
10+
# Posting data from a file named 'foobar' would thus be done with --data @foobar.
11+
#
12+
echo 'Testing TestLink REST API - POST /testcases'
13+
curl -i -H "Content-Type: application/json" -X POST --data "@../json/createTestCaseWithSteps.json" \
14+
-u restadminapikey:followthewitherabbitneo \
15+
http://localhost/development/tlrepo/lib/api/rest/v1/testcases

0 commit comments

Comments
 (0)