Avance de los features cases actions, cases list, input document y output document

This commit is contained in:
Wendy Nestor
2014-04-02 09:07:48 -04:00
parent e5e62da380
commit 5ab1eb19d9
6 changed files with 357 additions and 348 deletions

View File

@@ -261,4 +261,3 @@ Scenario Outline: Delete of the cases created in this script.
| 8 |
| 9 |
| 10 |

View File

@@ -1,7 +1,8 @@
@ProcessMakerMichelangelo @RestAPI
Feature: Cases Actions - the features in this script are (inbox, draftCaseList, participatedCaseList, unassignedCaseList, pausedCaseList and advanced Search) and (getCaseInfo, taskCase, newCase, newCaseImpersonate, reassignCase and routeCase)
Requirements:
a workspace with five of the process "Derivation rules - evaluation", "Derivation rules - Parallel", "Derivation rules - parallel evaluation", "Derivation rules - selection", "Derivation rules - sequential"
a workspace with five of the process "Derivation rules - evaluation", "Derivation rules - Parallel", "Derivation rules - parallel evaluation", "Derivation rules - selection",
"Derivation rules - sequential, Test Case Note, Test Case Note - Negative test, Test Case Variables, Test Designer Report Tables, Test Input Document Case, Test Michelangelo, Test Output Document Case"
Background:
Given that I have a valid access_token
@@ -14,7 +15,7 @@ Scenario: Returns a list of the cases for the logged in user (Inbox)
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "array"
And store response count in session variable as "count_inbox"
And the response has 14 records
Scenario: Returns a list of the cases for the logged in user (Draft)
@@ -22,7 +23,7 @@ Scenario: Returns a list of the cases for the logged in user (Draft)
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "array"
And store response count in session variable as "count_draft"
And the response has 15 records
Scenario: Returns a list of the cases for the logged in user (Participated)
@@ -30,7 +31,7 @@ Scenario: Returns a list of the cases for the logged in user (Participated)
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "array"
And store response count in session variable as "count_participated"
And the response has 57 records
Scenario: Returns a list of the cases for the logged in user (Unassigned)
@@ -38,7 +39,7 @@ Scenario: Returns a list of the cases for the logged in user (Unassigned)
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "array"
And store response count in session variable as "count_unassigned"
And the response has 12 records
Scenario: Returns a list of the cases for the logged in user (Paused)
@@ -46,41 +47,15 @@ Scenario: Returns a list of the cases for the logged in user (Paused)
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "array"
And store response count in session variable as "count_paused"
And the response has 12 records
Scenario: Returns a list of the cases for the logged in user (Advanced-Search)
Given I request "cases/paused"
Given I request "cases/advanced-search"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "array"
And store response count in session variable as "count_advanced-search"
Scenario Outline: Create a new case in workspace with process "Derivation rules - sequential", "Derivation rules - evaluation", "Derivation rules - Parallel", "Derivation rules - parallel evaluation", "Derivation rules - selection"
Given POST this data:
"""
{
"pro_uid": "<pro_uid>",
"tas_uid": "<tas_uid>",
"variables": [{"name": "admin", "lastname":"admin"}]
}
"""
And I request "cases"
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "object"
And store "app_uid" in session array as variable "app_uid_<app_uid_number>"
And store "app_number" in session array as variable "app_number_<app_uid_number>"
Examples:
| Description | app_uid_number | pro_uid | tas_uid | variables |
| Create new case with process "Derivation rules - sequential" | 1 | 99209594750ec27ea338927000421575 | 68707275350ec281ada1c95068712556 | |
| Create new case with process "Derivation rules - evaluation" | 2 | 46279907250ec73b9b25a78031279680 | 99371337850ec73c0a38eb6024620271 | |
| Create new case with process "Derivation rules - Parallel" | 3 | 35894775350ec7daa099378048029617 | 52838134750ec7dd0989fc0015625952 | |
| Create new case with process "Derivation rules - parallel evaluation" | 4 | 34579467750ec8d55e8b115057818502 | 89648437550ec8d593c2159010276089 | |
| Create new case with process "Derivation rules - selection" | 5 | 82458496050ec668981ecc7039804404 | 56900024450ec668e4a9243080698854 | |
And the response has 25 records
@@ -90,37 +65,37 @@ Scenario Outline: Get paging of list inbox
Then the response status code should be <http_code>
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "<type>"
And the response has <records> records more than "<count_inbox>"
And the type is "array"
And the response has <records> records in property "data"
Examples:
| test_description | start | limit | records | http_code | type |
| lowercase in Start | a | 1 | 0 | 400 | string |
| uppercase in Start | A | 1 | 0 | 400 | string |
| lowercase in Limit | 1 | a | 0 | 400 | string |
| uppercase in Limit | 1 | A | 0 | 400 | string |
| limit=3 | 1 | 3 | 3 | 200 | array |
| start=3 | 3 | 5 | 3 | 200 | array |
| limit and start =3 | 3 | 3 | 1 | 200 | array |
| high number for start | 1000 | 1 | 0 | 200 | array |
| high number for start | 1000 | 0 | 0 | 200 | array |
| empty result | 1 | 0 | 1 | 200 | array |
| empty string | 1 | 10000 | 1 | 200 | array |
| invalid start | b | 25 | 0 | 400 | string |
| invalid limit | 1 | c | 0 | 400 | string |
| start equals zero | 0 | 20 | 20 | 200 | array |
| search 0 | 0 | 0 | 0 | 200 | array |
| search 0 | 0 | 100 | 100 | 200 | array |
| negative numbers in start | -10 | 25 | 25 | 200 | array |
| negative numbers in limit | 1 | -25 | 25 | 200 | array |
| real numbers | 0.0 | 1.0 | 0 | 400 | string |
| real numbers in start | 0.0 | 25 | 0 | 400 | string |
| real numbers in limit | 1 | 1.4599 | 0 | 400 | string |
| only start | 1 | | 1 | 200 | array |
| only limit | | 25 | 1 | 200 | array |
| without start and limit | | | 1 | 200 | array |
| test_description | start | limit | records | http_code |
| lowercase in Start | a | 1 | 1 | 200 |
| uppercase in Start | A | 1 | 1 | 200 |
| lowercase in Limit | 1 | a | 1 | 200 |
| uppercase in Limit | 1 | A | 1 | 200 |
| limit=3 | 1 | 3 | 3 | 200 |
| start=3 | 3 | 5 | 3 | 200 |
| limit and start =3 | 3 | 3 | 1 | 200 |
| high number for start | 1000 | 1 | 0 | 200 |
| high number for start | 1000 | 0 | 0 | 200 |
| empty result | 1 | 0 | 1 | 200 |
| empty string | 1 | 10000 | 14 | 200 |
| invalid start | b | 25 | 14 | 200 |
| invalid limit | 1 | c | 1 | 200 |
| start equals zero | 0 | 20 | 14 | 200 |
| search 0 | 0 | 0 | 0 | 200 |
| search 0 | 0 | 100 | 14 | 200 |
| negative numbers in start | -10 | 25 | 14 | 200 |
| negative numbers in limit | 1 | -25 | 1 | 200 |
| real numbers | 0.0 | 1.0 | 1 | 200 |
| real numbers in start | 0.0 | 12 | 12 | 200 |
| real numbers in limit | 1 | 1.4599 | 1 | 200 |
| only start | 1 | | 1 | 200 |
| only limit | | 25 | 1 | 200 |
| without start and limit | | | 1 | 200 |
Scenario Outline: Get order type of Descending and Acending
@@ -129,13 +104,13 @@ Scenario Outline: Get order type of Descending and Acending
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_inbox>"
And the response has <records> records in property "data"
Examples:
| test_description | dir | records |
| Order for Acending | asc | 1 |
| Order for Descending | desc | 1 |
| Order for Descending | desc | 2 |
Scenario Outline: Get order type of Process Category
@@ -144,13 +119,13 @@ Scenario Outline: Get order type of Process Category
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_inbox>"
And the response has <records> records in property "data"
Examples:
| test_description | cat_uid | records |
| Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | 1 |
| Filter all categories | | |
| Filter all categories | | 14 |
Scenario Outline: Get order type of Process
@@ -159,13 +134,13 @@ Scenario Outline: Get order type of Process
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_inbox>"
And the response has <records> records in property "data"
Examples:
| test_description | pro_uid | records |
| Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | |
| Filter all cases | | |
| Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | 1 |
| Filter all cases | | 14 |
Scenario Outline: Get order type of Search of number the process
@@ -174,13 +149,13 @@ Scenario Outline: Get order type of Search of number the process
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_inbox>"
And the response has <records> records in property "data"
Examples:
Examples:
| test_description | search | records |
| Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | |
| Filter all cases | | |
| Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | 3 |
| Filter all cases | | 4 |
Scenario: Returns a list of the cases for the logged in user (Draft)
@@ -188,7 +163,7 @@ Scenario: Returns a list of the cases for the logged in user (Draft)
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "array"
And the response has <records> records more than "<count_draft>"
And the response has 15 records
Scenario Outline: Get paging of list Draft
@@ -196,36 +171,36 @@ Scenario Outline: Get paging of list Draft
Then the response status code should be <http_code>
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "<type>"
And the response has <records> records more than "<count_draft>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | start | limit | records | http_code | type |
| lowercase in Start | a | 1 | 0 | 400 | string |
| uppercase in Start | A | 1 | 0 | 400 | string |
| lowercase in Limit | 1 | a | 0 | 400 | string |
| uppercase in Limit | 1 | A | 0 | 400 | string |
| limit=3 | 1 | 3 | 3 | 200 | array |
| start=3 | 3 | 25 | 22 | 200 | array |
| limit and start =3 | 3 | 3 | 1 | 200 | array |
| high number for start | 1000 | 1 | 0 | 200 | array |
| high number for start | 1000 | 0 | 0 | 200 | array |
| empty result | 1 | 0 | 1 | 200 | array |
| empty string | 1 | 10000 | 1 | 200 | array |
| invalid start | b | 25 | 0 | 400 | string |
| invalid limit | 1 | c | 0 | 400 | string |
| start equals zero | 0 | 20 | 20 | 200 | array |
| search 0 | 0 | 0 | 0 | 200 | array |
| search 0 | 0 | 100 | 100 | 200 | array |
| negative numbers in start | -10 | 25 | 25 | 200 | array |
| negative numbers in limit | 1 | -25 | 25 | 200 | array |
| real numbers | 0.0 | 1.0 | 0 | 400 | string |
| real numbers in start | 0.0 | 25 | 0 | 400 | string |
| real numbers in limit | 1 | 1.4599 | 0 | 400 | string |
| only start | 1 | | 1 | 200 | array |
| only limit | | 25 | 1 | 200 | array |
| without start and limit | | | 1 | 200 | array |
| test_description | start | limit | records | http_code |
| lowercase in Start | a | 1 | 1 | 200 |
| uppercase in Start | A | 1 | 1 | 200 |
| lowercase in Limit | 1 | a | 1 | 200 |
| uppercase in Limit | 1 | A | 1 | 200 |
| limit=3 | 1 | 3 | 3 | 200 |
| start=3 | 3 | 5 | 3 | 200 |
| limit and start =3 | 3 | 3 | 1 | 200 |
| high number for start | 1000 | 1 | 0 | 200 |
| high number for start | 1000 | 0 | 0 | 200 |
| empty result | 1 | 0 | 1 | 200 |
| empty string | 1 | 10000 | 14 | 200 |
| invalid start | b | 25 | 15 | 200 |
| invalid limit | 1 | c | 1 | 200 |
| start equals zero | 0 | 20 | 15 | 200 |
| search 0 | 0 | 0 | 0 | 200 |
| search 0 | 0 | 100 | 15 | 200 |
| negative numbers in start | -10 | 25 | 15 | 200 |
| negative numbers in limit | 1 | -25 | 1 | 200 |
| real numbers | 0.0 | 1.0 | 1 | 200 |
| real numbers in start | 0.0 | 10 | 10 | 200 |
| real numbers in limit | 1 | 1.4599 | 1 | 200 |
| only start | 1 | | 1 | 200 |
| only limit | | 25 | 1 | 200 |
| without start and limit | | | 1 | 200 |
Scenario Outline: Get order type of Descending and Ascending
@@ -233,14 +208,14 @@ Scenario Outline: Get order type of Descending and Ascending
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_draft>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | dir | records |
| Order for Acending | asc | |
| Order for Descending | desc | |
| Order for Acending | asc | 15 |
| Order for Descending | desc | 15 |
@@ -249,14 +224,14 @@ Scenario Outline: Get order type of Process Category
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_draft>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | cat_uid | records |
| Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | |
| Filter all categories | | |
| Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | 9 |
| Filter all categories | | 15 |
Scenario Outline: Get order type of Process
@@ -264,14 +239,14 @@ Scenario Outline: Get order type of Process
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_draft>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | pro_uid | records |
| Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | |
| Filter all cases | | |
| Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | 2 |
| Filter all cases | | 15 |
Scenario Outline: Get order type of Search of the process
@@ -279,14 +254,14 @@ Scenario Outline: Get order type of Search of the process
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_draft>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | search | records |
| Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | |
| Filter all cases | | |
| Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | 4 |
| Filter all cases | | 5 |
Scenario: Returns a list of the cases for the logged in user (Participated)
@@ -294,44 +269,43 @@ Scenario: Returns a list of the cases for the logged in user (Participated)
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "array"
And the response has <records> records more than "<count_participated>"
And the response has 57 records
Scenario Outline: Get paging of list Participated
Given I request "cases/participated/paged?Start=<start>&limit=<limit>"
Then the response status code should be <http_code>
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "<type>"
And the response has <records> records more than "<count_participated>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | start | limit | records | http_code | type |
| lowercase in Start | a | 1 | 0 | 400 | string |
| uppercase in Start | A | 1 | 0 | 400 | string |
| lowercase in Limit | 1 | a | 0 | 400 | string |
| uppercase in Limit | 1 | A | 0 | 400 | string |
| limit=3 | 1 | 3 | 3 | 200 | array |
| start=3 | 3 | 25 | 22 | 200 | array |
| limit and start =3 | 3 | 3 | 1 | 200 | array |
| high number for start | 1000 | 1 | 0 | 200 | array |
| high number for start | 1000 | 0 | 0 | 200 | array |
| empty result | 1 | 0 | 1 | 200 | array |
| empty string | 1 | 10000 | 1 | 200 | array |
| invalid start | b | 25 | 0 | 400 | string |
| invalid limit | 1 | c | 0 | 400 | string |
| start equals zero | 0 | 20 | 20 | 200 | array |
| search 0 | 0 | 0 | 0 | 200 | array |
| search 0 | 0 | 100 | 100 | 200 | array |
| negative numbers in start | -10 | 25 | 25 | 200 | array |
| negative numbers in limit | 1 | -25 | 25 | 200 | array |
| real numbers | 0.0 | 1.0 | 0 | 400 | string |
| real numbers in start | 0.0 | 25 | 0 | 400 | string |
| real numbers in limit | 1 | 1.4599 | 0 | 400 | string |
| only start | 1 | | 1 | 200 | array |
| only limit | | 25 | 1 | 200 | array |
| without start and limit | | | 1 | 200 | array |
| test_description | start | limit | records | http_code |
| lowercase in Start | a | 1 | 1 | 200 |
| uppercase in Start | A | 1 | 1 | 200 |
| lowercase in Limit | 1 | a | 1 | 200 |
| uppercase in Limit | 1 | A | 1 | 200 |
| limit=3 | 1 | 3 | 3 | 200 |
| start=3 | 3 | 5 | 3 | 200 |
| limit and start =3 | 3 | 3 | 1 | 200 |
| high number for start | 1000 | 1 | 0 | 200 |
| high number for start | 1000 | 0 | 0 | 200 |
| empty result | 1 | 0 | 1 | 200 |
| empty string | 1 | 10000 | 57 | 200 |
| invalid start | b | 25 | 25 | 200 |
| invalid limit | 1 | c | 1 | 200 |
| start equals zero | 0 | 20 | 20 | 200 |
| search 0 | 0 | 0 | 0 | 200 |
| search 0 | 0 | 100 | 57 | 200 |
| negative numbers in start | -10 | 25 | 25 | 200 |
| negative numbers in limit | 1 | -25 | 1 | 200 |
| real numbers | 0.0 | 1.0 | 1 | 200 |
| real numbers in start | 0.0 | 12 | 12 | 200 |
| real numbers in limit | 1 | 1.4599 | 1 | 200 |
| only start | 1 | | 1 | 200 |
| only limit | | 25 | 25 | 200 |
| without start and limit | | | 1 | 200 |
Scenario Outline: Get order type of Descending an Descending
@@ -339,14 +313,14 @@ Scenario Outline: Get order type of Descending an Descending
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_participated>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | dir | records |
| Order for Acending | asc | |
| Order for Descending | desc | |
| Order for Acending | asc | 57 |
| Order for Descending | desc | 57 |
@@ -355,14 +329,14 @@ Scenario Outline: Get order type of Process Category
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_participated>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | cat_uid | records |
| Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | |
| Filter all categories | | |
| Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | 25 |
| Filter all categories | | 57 |
Scenario Outline: Get order type of Process
@@ -370,14 +344,14 @@ Scenario Outline: Get order type of Process
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_participated>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | pro_uid | records |
| Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | |
| Filter all cases | | |
| Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | 3 |
| Filter all cases | | 57 |
@@ -386,14 +360,14 @@ Scenario Outline: Get order type of Search
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_participated>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | search | records |
| Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | |
| Filter all cases | | |
| Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | 3 |
| Filter all cases | | 4 |
Scenario: Returns a list of the cases for the logged in user (Unassigned)
@@ -401,7 +375,7 @@ Scenario: Returns a list of the cases for the logged in user (Unassigned)
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "array"
And the response has <records> records more than "<count_unassigned>"
And the response has 12 records
Scenario Outline: Get paging of list Unassigned
@@ -409,36 +383,36 @@ Scenario Outline: Get paging of list Unassigned
Then the response status code should be <http_code>
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "<type>"
And the response has <records> records more than "<count_unassigned>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | start | limit | records | http_code | type |
| lowercase in Start | a | 1 | 0 | 400 | string |
| uppercase in Start | A | 1 | 0 | 400 | string |
| lowercase in Limit | 1 | a | 0 | 400 | string |
| uppercase in Limit | 1 | A | 0 | 400 | string |
| limit=3 | 1 | 3 | 3 | 200 | array |
| start=3 | 3 | 25 | 22 | 200 | array |
| limit and start =3 | 3 | 3 | 1 | 200 | array |
| high number for start | 1000 | 1 | 0 | 200 | array |
| high number for start | 1000 | 0 | 0 | 200 | array |
| empty result | 1 | 0 | 1 | 200 | array |
| empty string | 1 | 10000 | 1 | 200 | array |
| invalid start | b | 25 | 0 | 400 | string |
| invalid limit | 1 | c | 0 | 400 | string |
| start equals zero | 0 | 20 | 20 | 200 | array |
| search 0 | 0 | 0 | 0 | 200 | array |
| search 0 | 0 | 100 | 100 | 200 | array |
| negative numbers in start | -10 | 25 | 25 | 200 | array |
| negative numbers in limit | 1 | -25 | 25 | 200 | array |
| real numbers | 0.0 | 1.0 | 0 | 400 | string |
| real numbers in start | 0.0 | 25 | 0 | 400 | string |
| real numbers in limit | 1 | 1.4599 | 0 | 400 | string |
| only start | 1 | | 1 | 200 | array |
| only limit | | 25 | 1 | 200 | array |
| without start and limit | | | 1 | 200 | array |
| test_description | start | limit | records | http_code |
| lowercase in Start | a | 1 | 1 | 200 |
| uppercase in Start | A | 1 | 1 | 200 |
| lowercase in Limit | 1 | a | 1 | 200 |
| uppercase in Limit | 1 | A | 1 | 200 |
| limit=3 | 1 | 3 | 3 | 200 |
| start=3 | 3 | 5 | 3 | 200 |
| limit and start =3 | 3 | 3 | 1 | 200 |
| high number for start | 1000 | 1 | 0 | 200 |
| high number for start | 1000 | 0 | 0 | 200 |
| empty result | 1 | 0 | 1 | 200 |
| empty string | 1 | 10000 | 12 | 200 |
| invalid start | b | 25 | 12 | 200 |
| invalid limit | 1 | c | 1 | 200 |
| start equals zero | 0 | 20 | 12 | 200 |
| search 0 | 0 | 0 | 0 | 200 |
| search 0 | 0 | 100 | 12 | 200 |
| negative numbers in start | -10 | 25 | 12 | 200 |
| negative numbers in limit | 1 | -25 | 1 | 200 |
| real numbers | 0.0 | 1.0 | 1 | 200 |
| real numbers in start | 0.0 | 12 | 12 | 200 |
| real numbers in limit | 1 | 1.4599 | 1 | 200 |
| only start | 1 | | 1 | 200 |
| only limit | | 25 | 1 | 200 |
| without start and limit | | | 1 | 200 |
Scenario Outline: Get order type of Descending and Acending
@@ -446,14 +420,14 @@ Scenario Outline: Get order type of Descending and Acending
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_unassigned>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | dir | records |
| Order for Acending | asc | |
| Order for Descending | desc | |
| Order for Acending | asc | 12 |
| Order for Descending | desc | 12 |
Scenario Outline: Get order type of Process Category
@@ -461,14 +435,14 @@ Scenario Outline: Get order type of Process Category
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_unassigned>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | cat_uid | records |
| Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | |
| Filter all categories | | |
| Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | 12 |
| Filter all categories | | 12 |
Scenario Outline: Get order type of Process
@@ -476,14 +450,14 @@ Scenario Outline: Get order type of Process
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_unassigned>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | pro_uid | records |
| Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | |
| Filter all cases | | |
| Filter for cases "Derivation rules - sequential" | 35894775350ec7daa099378048029617 | 6 |
| Filter all cases | | 12 |
Scenario Outline: Get order type of Search
@@ -491,14 +465,14 @@ Scenario Outline: Get order type of Search
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_unassigned>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | search | records |
| Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | |
| Filter all cases | | |
| Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | 3 |
| Filter all cases | | 3 |
@@ -507,7 +481,7 @@ Scenario: Returns a list of the cases for the logged in user (Paused)
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "array"
And the response has <records> records more than "<count_paused>"
And the response has 12 records
Scenario Outline: Get paging of list Paused
@@ -515,36 +489,36 @@ Scenario Outline: Get paging of list Paused
Then the response status code should be <http_code>
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "<type>"
And the response has <records> records more than "<count_paused>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | start | limit | records | http_code | type |
| lowercase in Start | a | 1 | 0 | 400 | string |
| uppercase in Start | A | 1 | 0 | 400 | string |
| lowercase in Limit | 1 | a | 0 | 400 | string |
| uppercase in Limit | 1 | A | 0 | 400 | string |
| limit=3 | 1 | 3 | 3 | 200 | array |
| start=3 | 3 | 25 | 22 | 200 | array |
| limit and start =3 | 3 | 3 | 1 | 200 | array |
| high number for start | 1000 | 1 | 0 | 200 | array |
| high number for start | 1000 | 0 | 0 | 200 | array |
| empty result | 1 | 0 | 1 | 200 | array |
| empty string | 1 | 10000 | 1 | 200 | array |
| invalid start | b | 25 | 0 | 400 | string |
| invalid limit | 1 | c | 0 | 400 | string |
| start equals zero | 0 | 20 | 20 | 200 | array |
| search 0 | 0 | 0 | 0 | 200 | array |
| search 0 | 0 | 100 | 100 | 200 | array |
| negative numbers in start | -10 | 25 | 25 | 200 | array |
| negative numbers in limit | 1 | -25 | 25 | 200 | array |
| real numbers | 0.0 | 1.0 | 0 | 400 | string |
| real numbers in start | 0.0 | 25 | 0 | 400 | string |
| real numbers in limit | 1 | 1.4599 | 0 | 400 | string |
| only start | 1 | | 1 | 200 | array |
| only limit | | 25 | 1 | 200 | array |
| without start and limit | | | 1 | 200 | array |
| test_description | start | limit | records | http_code |
| lowercase in Start | a | 1 | 1 | 200 |
| uppercase in Start | A | 1 | 1 | 200 |
| lowercase in Limit | 1 | a | 1 | 200 |
| uppercase in Limit | 1 | A | 1 | 200 |
| limit=3 | 1 | 3 | 3 | 200 |
| start=3 | 3 | 5 | 3 | 200 |
| limit and start =3 | 3 | 3 | 1 | 200 |
| high number for start | 1000 | 1 | 0 | 200 |
| high number for start | 1000 | 0 | 0 | 200 |
| empty result | 1 | 0 | 1 | 200 |
| empty string | 1 | 10000 | 12 | 200 |
| invalid start | b | 25 | 12 | 200 |
| invalid limit | 1 | c | 1 | 200 |
| start equals zero | 0 | 20 | 12 | 200 |
| search 0 | 0 | 0 | 0 | 200 |
| search 0 | 0 | 100 | 12 | 200 |
| negative numbers in start | -10 | 25 | 12 | 200 |
| negative numbers in limit | 1 | -25 | 1 | 200 |
| real numbers | 0.0 | 1.0 | 1 | 200 |
| real numbers in start | 0.0 | 12 | 12 | 200 |
| real numbers in limit | 1 | 1.4599 | 1 | 200 |
| only start | 1 | | 1 | 200 |
| only limit | | 25 | 1 | 200 |
| without start and limit | | | 1 | 200 |
Scenario Outline: Get order type of Descending and Acending
@@ -552,14 +526,14 @@ Scenario Outline: Get order type of Descending and Acending
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_paused>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | dir | records |
| Order for Acending | asc | |
| Order for Descending | desc | |
| Order for Acending | asc | 12 |
| Order for Descending | desc | 12 |
Scenario Outline: Get order type of Process Category
@@ -567,14 +541,14 @@ Scenario Outline: Get order type of Process Category
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_paused>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | cat_uid | records |
| Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | |
| Filter all categories | | |
| Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | 1 |
| Filter all categories | | 12 |
Scenario Outline: Get order type of Process
@@ -582,14 +556,14 @@ Scenario Outline: Get order type of Process
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_paused>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | pro_uid | records |
| Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | |
| Filter all cases | | |
| Filter for cases "Derivation rules - sequential" | 48270290453359748c82a76038662132 | 2 |
| Filter all cases | | 12 |
Scenario Outline: Get order type of Search
@@ -597,14 +571,14 @@ Scenario Outline: Get order type of Search
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_paused>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | search | records |
| Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | |
| Filter all cases | | |
| Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | 2 |
| Filter all cases | | 3 |
Scenario: Returns a list of the cases for the logged in user (Advanced Search)
@@ -612,7 +586,7 @@ Scenario: Returns a list of the cases for the logged in user (Advanced Search)
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "array"
And the response has <records> records more than "<count_advanced-search>"
And the response has 50 records
Scenario Outline: Get paging of list Advanced Search
@@ -620,36 +594,36 @@ Scenario Outline: Get paging of list Advanced Search
Then the response status code should be <http_code>
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "<type>"
And the response has <records> records more than "<count_advanced-search>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | start | limit | records | http_code | type |
| lowercase in Start | a | 1 | 0 | 400 | string |
| uppercase in Start | A | 1 | 0 | 400 | string |
| lowercase in Limit | 1 | a | 0 | 400 | string |
| uppercase in Limit | 1 | A | 0 | 400 | string |
| limit=3 | 1 | 3 | 3 | 200 | array |
| start=3 | 3 | 25 | 22 | 200 | array |
| limit and start =3 | 3 | 3 | 1 | 200 | array |
| high number for start | 1000 | 1 | 0 | 200 | array |
| high number for start | 1000 | 0 | 0 | 200 | array |
| empty result | 1 | 0 | 1 | 200 | array |
| empty string | 1 | 10000 | 1 | 200 | array |
| invalid start | b | 25 | 0 | 400 | string |
| invalid limit | 1 | c | 0 | 400 | string |
| start equals zero | 0 | 20 | 20 | 200 | array |
| search 0 | 0 | 0 | 0 | 200 | array |
| search 0 | 0 | 100 | 100 | 200 | array |
| negative numbers in start | -10 | 25 | 25 | 200 | array |
| negative numbers in limit | 1 | -25 | 25 | 200 | array |
| real numbers | 0.0 | 1.0 | 0 | 400 | string |
| real numbers in start | 0.0 | 25 | 0 | 400 | string |
| real numbers in limit | 1 | 1.4599 | 0 | 400 | string |
| only start | 1 | | 1 | 200 | array |
| only limit | | 25 | 1 | 200 | array |
| without start and limit | | | 1 | 200 | array |
| test_description | start | limit | records | http_code |
| lowercase in Start | a | 1 | 1 | 200 |
| uppercase in Start | A | 1 | 1 | 200 |
| lowercase in Limit | 1 | a | 1 | 200 |
| uppercase in Limit | 1 | A | 1 | 200 |
| limit=3 | 1 | 3 | 3 | 200 |
| start=3 | 3 | 5 | 3 | 200 |
| limit and start =3 | 3 | 3 | 1 | 200 |
| high number for start | 1000 | 1 | 0 | 200 |
| high number for start | 1000 | 0 | 0 | 200 |
| empty result | 1 | 0 | 1 | 200 |
| empty string | 1 | 10000 | 50 | 200 |
| invalid start | b | 25 | 25 | 200 |
| invalid limit | 1 | c | 1 | 200 |
| start equals zero | 0 | 20 | 20 | 200 |
| search 0 | 0 | 0 | 0 | 200 |
| search 0 | 0 | 100 | 50 | 200 |
| negative numbers in start | -10 | 25 | 25 | 200 |
| negative numbers in limit | 1 | -25 | 1 | 200 |
| real numbers | 0.0 | 1.0 | 1 | 200 |
| real numbers in start | 0.0 | 12 | 12 | 200 |
| real numbers in limit | 1 | 1.4599 | 1 | 200 |
| only start | 1 | | 1 | 200 |
| only limit | | 25 | 1 | 200 |
| without start and limit | | | 1 | 200 |
Scenario Outline: Get order type of Descending and Acending
@@ -657,14 +631,14 @@ Scenario Outline: Get order type of Descending and Acending
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_advanced-search>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | dir | records |
| Order for Acending | asc | |
| Order for Descending | desc | |
| Order for Acending | asc | 50 |
| Order for Descending | desc | 50 |
Scenario Outline: Get order type of Process Category
@@ -672,14 +646,14 @@ Scenario Outline: Get order type of Process Category
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_advanced-search>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | cat_uid | records |
| Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | |
| Filter all categories | | |
| Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | 25 |
| Filter all categories | | 50 |
@@ -688,14 +662,14 @@ Scenario Outline: Get order type of Process
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_advanced-search>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | pro_uid | records |
| Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | |
| Filter all cases | | |
| Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | 3 |
| Filter all cases | | 50 |
@@ -704,14 +678,14 @@ Scenario Outline: Get order type of Search
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_advanced-search>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | search | records |
| Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | |
| Filter all cases | | |
| Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | 2 |
| Filter all cases | | 2 |
Scenario Outline: Get order for Status
@@ -719,16 +693,16 @@ Scenario Outline: Get order for Status
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_advanced-search>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | app_status | records |
| Filter Status = All Status | | |
| Filter Status = Completed | COMPLETED | |
| Filter Status = Draft | DRAFT | |
| Filter Status = To Do | TO_DO | |
| Filter Status = All Status | | 25 |
| Filter Status = Completed | COMPLETED | 2 |
| Filter Status = Draft | DRAFT | 15 |
| Filter Status = To Do | TO_DO | 25 |
Scenario Outline: Get order for User
@@ -736,16 +710,16 @@ Scenario Outline: Get order for User
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_advanced-search>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | usr_uid | records |
| Filter Status = All User | | |
| Filter Status = aaron | 51049032352d56710347233042615067 | |
| Filter Status = admin | 00000000000000000000000000000001 | |
| Filter Status = chris | 24166330352d56730cdd525035621101 | |
| Filter Status = All User | | 25 |
| Filter Status = aaron | 51049032352d56710347233042615067 | 2 |
| Filter Status = admin | 00000000000000000000000000000001 | 2 |
| Filter Status = chris | 24166330352d56730cdd525035621101 | 2 |
Scenario Outline: Get order for date
@@ -753,11 +727,11 @@ Scenario Outline: Get order for date
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has <records> records more than "<count_advanced-search>"
And the type is "object"
And the response has <records> records in property "data"
Examples:
| test_description | date_from | date_to | records |
| Filter date = 2014-03-01 | 2014-03-01 | 2014-03-20 | |
| Filter date = 2014-03-15 | 2014-03-15 | 2014-03-20 | |
| Filter date = 2014-03-01 | 2014-03-01 | 2014-03-31 | 5 |
| Filter date = 2014-03-15 | 2014-03-15 | 2014-04-01 | 25 |

View File

@@ -13,11 +13,34 @@ Scenario: Returns a list of the uploaded documents for a given case
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "array"
And the response has 5 records
Scenario Outline: Post metadata and then upload documents for a given case
Given POST upload an input document "<document_file>" to "cases/<case_uid>/input-document"
"""
{
"inp_doc_uid": "<inp_doc_uid>",
"tas_uid": "<tas_uid>",
"app_doc_comment": "<app_doc_comment>"
}
"""
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "object"
And store "app_doc_uid" in session array as variable "app_doc_uid_<app_doc_uid_number>"
Examples:
| app_doc_uid_number | document_file | case_uid | inp_doc_uid | tas_uid | app_doc_comment |
| 1 | /home/wendy/uploadfiles/test1.html | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
| 2 | /home/wendy/uploadfiles/random.jpg | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
| 3 | /home/wendy/uploadfiles/test.pm | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
| 4 | /home/wendy/uploadfiles/test.txt | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
Scenario Outline: Returns an uploaded documents for a given case
Given I request "cases/64654381053382b8bb4c415067063003/input-document/<input-document>"
Given I request "cases/<case_uid>/output-document/app_doc_uid" with the key "app_doc_uid" stored in session array as variable "app_doc_uid_<app_doc_uid_number>"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "object"
@@ -31,37 +54,14 @@ Scenario Outline: Returns an uploaded documents for a given case
And the "app_doc_index" property equals "<app_doc_index>"
And the "app_doc_link" property equals "<app_doc_link>"
Examples:
| test_description | input-document | app_doc_uid | app_doc_filename | doc_uid | app_doc_version | app_doc_create_date | app_doc_create_user | app_doc_type | app_doc_index | app_doc_link |
| Get Input "Desert.jpg" | 6075490825331a1c5eebff9015468244 | 6075490825331a1c5eebff9015468244 | Desert.jpg | 68671480353319e5e1dee74089764900 | 1 | 2014-03-25 11:33:25 | , Administrator (admin) | INPUT | 1 | cases/cases_ShowDocument?a=6075490825331a1c5eebff9015468244&v=1 |
| Get Input "Screenshot Case Archive.docx" | 3770386635331a1f49c78e8070071944 | 3770386635331a1f49c78e8070071944 | Screenshot Case Archive.docx | 68671480353319e5e1dee74089764900 | 1 | 2014-03-25 11:34:12 | , Administrator (admin) | INPUT | 2 | cases/cases_ShowDocument?a=3770386635331a1f49c78e8070071944&v=1 |
| Get Input "alert_message.html" | 6382509235331a235b27a82003894796 | 6382509235331a235b27a82003894796 | alert_message.htm | 68588088053319e68d88f67081331478 | 1 | 2014-03-25 11:35:17 | , Administrator (admin) | INPUT | 4 | cases/cases_ShowDocument?a=6382509235331a235b27a82003894796&v=1 |
| Get Input "actionsByEmail-2.5.0.28.tar" | 3548449385331a24a34d273018695729 | 3548449385331a24a34d273018695729 | actionsByEmail-2.5.0.28.tar | 68588088053319e68d88f67081331478 | 1 | 2014-03-25 11:35:38 | , Administrator (admin) | INPUT | 5 | cases/cases_ShowDocument?a=3548449385331a24a34d273018695729&v=1 |
| Get Input "Step_ordenamiento (5).pm" | 3814366275331a21b80d603018480738 | 3814366275331a21b80d603018480738 | Step_ordenamiento (5).pm | 68588088053319e68d88f67081331478 | 2 | 2014-03-25 11:36:11 | , Administrator (admin) | INPUT | 6 | cases/cases_ShowDocument?a=3814366275331a21b80d603018480738&v=2 |
Scenario Outline: Post metadata and then upload documents for a given case
Given POST upload an input document "<document_file>" to "cases/<case_uid>/input-document"
"""
{
"inp_doc_uid": "<inp_doc_uid>",
"tas_uid": "<tas_uid>",
"app_doc_comment": "<app_doc_comment>"
}
"""
Then the response status code should be 201
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "object"
And store "app_doc_uid" in session array as variable "app_doc_uid_<app_doc_uid_number>"
Examples:
| app_doc_uid_number | document_file | case_uid | inp_doc_uid | tas_uid | app_doc_comment |
| 1 | /home/wendy/uploadfiles/test1.html | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
| test_description | app_doc_uid_number | case_uid | inp_doc_uid | tas_uid | app_doc_comment |
| Get Input "Desert.jpg" | 1 | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
| Get Input "Screenshot Case Archive.docx" | 2 | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
| Get Input "alert_message.html" | 3 | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
| Get Input "actionsByEmail-2.5.0.28.tar" | 4 | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
Scenario Outline: Delete an uploaded or generated document from a case.
@@ -75,3 +75,6 @@ Scenario Outline: Delete an uploaded or generated document from a case.
Examples:
| app_doc_uid_number |
| 1 |
| 2 |
| 3 |
| 4 |

View File

@@ -0,0 +1,19 @@
Scenario Outline: Pull information of an inexistent input document. should return an error
Given I request "cases/64654381053382b8bb4c415067063003/input-document/<input-document>"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "object"
And the "app_doc_uid" property equals "<app_doc_uid>"
And the "app_doc_filename" property equals "<app_doc_filename>"
And the "doc_uid" property equals "<doc_uid>"
And the "app_doc_version" property equals "<app_doc_version>"
And the "app_doc_create_date" property equals "<app_doc_create_date>"
And the "app_doc_create_user" property equals "<app_doc_create_user>"
And the "app_doc_type" property equals "<app_doc_type>"
And the "app_doc_index" property equals "<app_doc_index>"
And the "app_doc_link" property equals "<app_doc_link>"
Examples:
| test_description | input-document | app_doc_uid | app_doc_filename | doc_uid | app_doc_version | app_doc_create_date | app_doc_create_user | app_doc_type | app_doc_index | app_doc_link |
| Get Input "Desert.jpg" | 6075490825331a1c5eebff9015468244 | 6075490825331a1c5eebff9015468244 | Desert.jpg | 68671480353319e5e1dee74089764900 | 1 | 2014-03-25 11:33:25 | , Administrator (admin) | INPUT | 1 | cases/cases_ShowDocument?a=6075490825331a1c5eebff9015468244&v=1 |

View File

@@ -1118,10 +1118,20 @@ class RestContext extends BehatContext
/**
* @Then /^the response has (\d+) records$/
* @Then /^the response has (\d+) record$/
* @Then /^the response has (\d+) records in property "([^"]*)"$/
* @Then /^the response has (\d+) record in property "([^"]*)"$/
*/
public function theResponseHasRecords($quantityOfRecords)
public function theResponseHasRecords($quantityOfRecords, $responseProperty="")
{
if($responseProperty!=""){
if(!isset($this->_data->$responseProperty)){
throw new Exception("the Response data doesn't have a property named: $responseProperty\n\n" );
}
$data = $this->_data->$responseProperty;
}else{
$data = $this->_data;
}
if (!is_array($data)) {
if ($quantityOfRecords == 0) {
//if we expect 0 records and the response in fact is not an array, just return as a valid test

View File

@@ -12,8 +12,12 @@ $a = array('form'=>'@'.$file, 'inp_doc_uid'=>$inp_doc_uid, 'tas_uid' =>$tas_uid,
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_HTTPHEADER,$headr);
curl_setopt($ch, CURLOPT_POSTFIELDS, $a);
print "<h3>post</h3>";
print_r($a);
curl_setopt($ch, CURLOPT_USERAGENT,'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$postResult = curl_exec($ch);
curl_close($ch);
print_r($postResult);
print "<h3>response var_dump</h3>";
var_dump($postResult);
print "<textarea cols='50' rows='10'>".$postResult."</textarea>";