Skip to content

Commit 6244ea1

Browse files
committed
new examples
1 parent 4b71d6c commit 6244ea1

7 files changed

Lines changed: 92 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
clear
13+
echo 'Testing TestLink REST API - POST /testcases'
14+
echo
15+
if [ -z "$1" ]; then
16+
echo usage: $0 .JSONFILE \(searched in ../json/\)
17+
exit
18+
fi
19+
20+
curl -i -H "Content-Type: application/json" -X POST --data "@../json/$1" \
21+
-u restadminapikey:followthewitherabbitneo \
22+
http://localhost/development/tlrepo/lib/api/rest/v1/testcases
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name":"Test Case ALFA",
3+
"testSuiteID":360,
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+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name":"Test Case XL5-A",
3+
"testSuiteID":378,
4+
"testProjectID": 358,
5+
"summary": "This is a summary for Test Case second line line #3",
6+
"preconditions":"No preconditions",
7+
"order":100,
8+
"authorID":1,
9+
"importance":2,
10+
"executionType":1
11+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name":"Test Case XL5-B",
3+
"testSuiteID":378,"testProjectID":358,
4+
"summary":
5+
"This is a summary for Test Case
6+
second line
7+
line #3",
8+
"preconditions":"No preconditions",
9+
"order":100,"authorID":1,"importance":2,"executionType":1
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name":"Test Case XL5-C",
3+
"testSuiteID":378,"testProjectID":358,
4+
"summary":
5+
"This is a summary for Test Case
6+
second line
7+
line #3",
8+
"preconditions":"No preconditions",
9+
"order":100,"authorID":1,"importance":2,"executionType":1
10+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name":"Test Case XL5-D",
3+
"testSuiteID":378,"testProjectID":358,
4+
"summary":
5+
"This is a summary for Test Case <br>
6+
second line <br>
7+
line #3",
8+
"preconditions":"No preconditions for this testcase.
9+
<br>If you use an array [] can be empty
10+
<br>If you need to use a object {}",
11+
"order":100,"authorID":1,"importance":2,"executionType":1
12+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name":"Test Scenarios for Filter Criteria",
3+
"testSuiteID":378,"testProjectID":358,
4+
"preconditions":"No preconditions for this testcase.
5+
<br>If you use an array [] can be empty
6+
<br>If you need to use a object {}",
7+
"order":100,"authorID":1,"importance":2,"executionType":1,
8+
"summary":
9+
"<br>1. User should be able to filter results using all parameters on the page
10+
<br>2. Refine search functionality should load search page with all user selected search parameters
11+
<br>3. When there is at least one filter criteria is required to perform search operation,
12+
<br> make sure proper error message is displayed when user submits the page without selecting any filter criteria.
13+
<br>4. When at least one filter criteria selection is not compulsory user
14+
<br> should be able to submit page and default search criteria should get used to query results
15+
<br>5. Proper validation messages should be displayed for invalid values for filter criteria"
16+
}

0 commit comments

Comments
 (0)