If you want to work from command line ... (Linux)

Discussions and information (NO ISSUES) regarding REST API (still NO ETA)

If you want to work from command line ... (Linux)

Postby fman » Sat May 18, 2013 10:36 am

You can create a test case writing a simple file like this:
{
"name":"Test Scenarios for Filter Criteria",
"testSuiteID":378,"testProjectID":358,
"preconditions":"No preconditions for this testcase.
<br>If you use an array [] can be empty
<br>If you need to use a object {}",
"order":100,"authorID":1,"importance":2,"executionType":1,
"summary":
"<br>1. User should be able to filter results using all parameters on the page
<br>2. Refine search functionality should load search page with all user selected search parameters
<br>3. When there is at least one filter criteria is required to perform search operation,
<br> make sure proper error message is displayed when user submits the page without selecting any filter criteria.
<br>4. When at least one filter criteria selection is not compulsory user
<br> should be able to submit page and default search criteria should get used to query results
<br>5. Proper validation messages should be displayed for invalid values for filter criteria"
}

And send it to testlink (you need latest code from gitorious that will become 1.9.7), using scripts provided on
http://gitorious.org/testlink-ga/testli ... pi/v1/curl

1. download tarball from http://gitorious.org/testlink-ga/testlink-tests
you will get: testlink-ga-testlink-tests-master.tar.gz
2. uncompress on /tmp
you will get: /tmp/testlink-ga-testlink-tests/
move to
/tmp/testlink-ga-testlink-tests/rest-api/v1/curl/generic/
give a look to createTestCaseX.sh, to undertand how it works

You need to go to /tmp/testlink-ga-testlink-tests/rest-api/v1/curl/json/ and edit file testCaseComplex.json
in order to make it suitable for your installation (basically you need to provide a valid test project id and test suite id)

After some test of how this work, you are ready to manage (at least) test case creation from command line.
fman
Member of TestLink Community
 
Posts: 3019
Joined: Tue Nov 15, 2005 7:19 am

Return to REST API



Who is online

Users browsing this forum: No registered users and 1 guest

cron