cambio de folder y avance en department
This commit is contained in:
@@ -0,0 +1,120 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Departaments
|
||||
Requirements:
|
||||
a workspace with the 16 departments created already loaded
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
|
||||
Scenario: List all Departaments in the workspace when exactly are 16 departaments created
|
||||
Given I request "department"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 16 record
|
||||
|
||||
|
||||
Scenario: Get a single department of de Sales Division department
|
||||
Given I request "department/12921473252d567506e6e63079240767"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And the "dep_parent" property equals ""
|
||||
And the "dep_title" property equals "Sales Division"
|
||||
And the "dep_status" property equals "ACTIVE"
|
||||
And the "dep_manager" property equals ""
|
||||
And the "dep_ldap_dn" property equals ""
|
||||
And the "dep_last" property equals "0"
|
||||
And the "dep_manager_username" property equals ""
|
||||
And the "dep_manager_lastname" property equals ""
|
||||
And the "has_children" property equals "0"
|
||||
|
||||
|
||||
Scenario: Create a new department in the workspace
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
|
||||
"dep_title" : "TestDepartment",
|
||||
"dep_parent" : "",
|
||||
"dep_status" : "ACTIVE"
|
||||
|
||||
}
|
||||
"""
|
||||
And I request "department"
|
||||
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 "dep_uid" in session array
|
||||
|
||||
|
||||
Scenario: Update a department created in this script
|
||||
Given PUT this data:
|
||||
"""
|
||||
{
|
||||
"dep_title" : "TestDepartment Update",
|
||||
"dep_status" : "INACTIVE"
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "dep_uid" stored in session array
|
||||
And I request "department"
|
||||
Then the response status code should be 200
|
||||
And the content type is "application/json"
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
|
||||
|
||||
Scenario: Get a single department after update of the department created of this script
|
||||
Given that I want to get a resource with the key "dep_uid" stored in session array
|
||||
Given I request "department"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the "dep_title" property equals "TestDepartment Update"
|
||||
And the "dep_status" property equals "INACTIVE"
|
||||
|
||||
|
||||
#Scenario: Assign user to department created in this script
|
||||
# Given POST this data:
|
||||
# """
|
||||
# {
|
||||
|
||||
# "dep_title" : "TestDepartment",
|
||||
# "dep_parent" : "",git
|
||||
# "dep_status" : "ACTIVE"
|
||||
|
||||
#}
|
||||
#"""
|
||||
#And I request "department/<dep_uid>/assign-user/62511352152d5673bba9cd4062743508 "
|
||||
#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 "dep_uid" in session array
|
||||
|
||||
|
||||
Scenario: List all Departaments in the workspace when exactly are 16 departaments created
|
||||
Given I request "department"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 17 record
|
||||
|
||||
|
||||
Scenario: Delete a department created in this script
|
||||
Given that I want to delete a resource with the key "dep_uid" stored in session array
|
||||
And I request "department"
|
||||
Then the response status code should be 200
|
||||
And the content type is "application/json"
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
|
||||
Scenario: List all Departaments in the workspace when exactly are 16 departaments created
|
||||
Given I request "department"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 16 record
|
||||
@@ -0,0 +1,169 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Departaments Main Tests
|
||||
Requirements:
|
||||
a workspace with the 16 departments created already loaded
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
|
||||
Scenario: List all Departaments in the workspace when exactly are 16 departaments created
|
||||
Given I request "department"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 16 record
|
||||
|
||||
|
||||
Scenario: Get a single department of de Sales Division department
|
||||
Given I request "department/12921473252d567506e6e63079240767"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And the "dep_parent" property equals ""
|
||||
And the "dep_title" property equals "Sales Division"
|
||||
And the "dep_status" property equals "ACTIVE"
|
||||
And the "dep_manager" property equals ""
|
||||
And the "dep_ldap_dn" property equals ""
|
||||
And the "dep_last" property equals "0"
|
||||
And the "dep_manager_username" property equals ""
|
||||
And the "dep_manager_lastname" property equals ""
|
||||
And the "has_children" property equals "0"
|
||||
|
||||
|
||||
Scenario Outline: Create a new departments in the workspace
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
|
||||
"dep_title" : "<dep_title>",
|
||||
"dep_parent" : "<dep_parent>",
|
||||
"dep_status" : "<dep_status>"
|
||||
|
||||
}
|
||||
"""
|
||||
And I request "department"
|
||||
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 "dep_uid" in session array as variable "dep_uid_<dep_uid_number>"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | dep_uid_number | dep_title | dep_parent | dep_status |
|
||||
| Created a department padre with status active | 1 | Department 1 | | ACTIVE |
|
||||
| Created a department hijo with status active | 2 | Department 2 | 28036037252d56752770585009591640 | ACTIVE |
|
||||
| Created a department padre with status inactive | 3 | Department 3 | | INACTIVE |
|
||||
| Created a department hijo with status inactive | 4 | Department 4 | 28036037252d56752770585009591640 | INACTIVE |
|
||||
| Created a department with character special | 5 | Department 5!@#$%^& | | ACTIVE |
|
||||
|
||||
|
||||
Scenario: Create a department with same name
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
|
||||
"dep_title" : "Department 1",
|
||||
"dep_parent" : "",
|
||||
"dep_status" : "ACTIVE"
|
||||
|
||||
}
|
||||
"""
|
||||
And I request "department"
|
||||
Then the response status code should be 400
|
||||
And the response status message should have the following text "exist"
|
||||
|
||||
|
||||
Scenario: List all Departaments in the workspace when exactly are 21 departaments created
|
||||
Given I request "department"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 19 record
|
||||
|
||||
|
||||
Scenario Outline: Update a department created in this script
|
||||
Given PUT this data:
|
||||
"""
|
||||
{
|
||||
|
||||
"dep_title" : "<dep_title>",
|
||||
"dep_status" : "<dep_status>"
|
||||
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "dep_uid" stored in session array as variable "dep_uid_<dep_uid_number>"
|
||||
And I request "department"
|
||||
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"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | dep_uid_number | dep_title | dep_status |
|
||||
| Update of field title and status of department | 1 | Department 1 UPDATE | INACTIVE |
|
||||
| Update of field title and status of department | 3 | Department 3 UPDATE | ACTIVE |
|
||||
|
||||
|
||||
Scenario Outline: Get a single department after update of the department created of this script
|
||||
Given that I want to get a resource with the key "dep_uid" stored in session array as variable "dep_uid_<dep_uid_number>"
|
||||
And I request "department"
|
||||
Then the response status code should be 200
|
||||
And the content type is "application/json"
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And that "dep_title" is set to "<dep_title>"
|
||||
And that "dep_status" is set to "<dep_status>"
|
||||
|
||||
Examples:
|
||||
|
||||
| dep_uid_number | dep_title | dep_status |
|
||||
| 1 | Department 1 UPDATE | INACTIVE |
|
||||
| 3 | Department 3 UPDATE | ACTIVE |
|
||||
|
||||
|
||||
#Scenario: Assign user to department created in this script
|
||||
# Given POST this data:
|
||||
# """
|
||||
# {
|
||||
|
||||
# "dep_title" : "TestDepartment",
|
||||
# "dep_parent" : "",git
|
||||
# "dep_status" : "ACTIVE"
|
||||
|
||||
#}
|
||||
#"""
|
||||
#And I request "department/<dep_uid>/assign-user/62511352152d5673bba9cd4062743508 "
|
||||
#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 "dep_uid" in session array
|
||||
|
||||
|
||||
Scenario Outline: Delete a department created in this script
|
||||
Given that I want to delete a resource with the key "dep_uid" stored in session array as variable "dep_uid_<dep_uid_number>"
|
||||
And I request "department"
|
||||
Then the response status code should be 200
|
||||
And the content type is "application/json"
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
|
||||
| dep_uid_number |
|
||||
| 1 |
|
||||
| 2 |
|
||||
| 3 |
|
||||
| 4 |
|
||||
| 5 |
|
||||
|
||||
|
||||
Scenario: List all Departaments in the workspace when exactly are 16 departaments created
|
||||
Given I request "department"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 16 record
|
||||
@@ -0,0 +1,28 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Departments Negative Tests
|
||||
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
Scenario Outline: Create a new departments in the workspace with bad parameters (negative tests)
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
|
||||
"dep_title" : "<dep_title>",
|
||||
"dep_parent" : "<dep_parent>",
|
||||
"dep_status" : "<dep_status>"
|
||||
|
||||
}
|
||||
"""
|
||||
And I request "department"
|
||||
Then the response status code should be <error_code>
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | dep_title | dep_parent | dep_status | error_code | error_message |
|
||||
| without dep_title | | | ACTIVE | 400 | dep_title |
|
||||
| Invalid dep_parent | Department 2 | 28036030000000000000005009591640 | ACTIVE | 400 | dep_parent |
|
||||
| Invalid dep_status | Department 3 | | TRIGGER | 400 | dep_status |
|
||||
@@ -0,0 +1,232 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Group
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
#GROUP
|
||||
|
||||
#GET /api/1.0/{workspace}/groups?filter={filter}&start={start}&limit={limit}
|
||||
# Get list Groups
|
||||
Scenario: Get list Groups
|
||||
And I request "groups?filter=for basic behat"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the json data is an empty array
|
||||
|
||||
#POST /api/1.0/{workspace}/group
|
||||
# Create new Group
|
||||
Scenario Outline: Create new Group
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"grp_title": "<grp_title>",
|
||||
"grp_status": "<grp_status>"
|
||||
}
|
||||
"""
|
||||
And I request "group"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 201
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And store "grp_uid" in session array as variable "grp_uid<i>"
|
||||
|
||||
Examples:
|
||||
| i | grp_title | grp_status |
|
||||
| 0 | Demo Group1 for basic behat | ACTIVE |
|
||||
| 1 | Demo Group2 for basic behat | ACTIVE |
|
||||
|
||||
#PUT /api/1.0/{workspace}/group/{grp_uid}
|
||||
# Update Group
|
||||
Scenario Outline: Update Group
|
||||
Given PUT this data:
|
||||
"""
|
||||
{
|
||||
"grp_status": "<grp_status>"
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "grp_uid" stored in session array as variable "grp_uid<i>"
|
||||
And I request "group"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
| i | grp_status |
|
||||
| 0 | INACTIVE |
|
||||
| 1 | INACTIVE |
|
||||
|
||||
#GET /api/1.0/{workspace}/groups?filter={filter}&start={start}&limit={limit}
|
||||
# Get list Groups
|
||||
Scenario Outline: Get list Groups
|
||||
And I request "groups?filter=for basic behat"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the "grp_title" property in row <i> equals "<grp_title>"
|
||||
And the "grp_status" property in row <i> equals "<grp_status>"
|
||||
And the "grp_users" property in row <i> equals "<grp_users>"
|
||||
And the "grp_tasks" property in row <i> equals "<grp_tasks>"
|
||||
|
||||
Examples:
|
||||
| i | grp_title | grp_status | grp_users | grp_tasks |
|
||||
| 0 | Demo Group1 for basic behat | INACTIVE | 0 | 0 |
|
||||
| 1 | Demo Group2 for basic behat | INACTIVE | 0 | 0 |
|
||||
|
||||
#GET /api/1.0/{workspace}/group/{grp_uid}
|
||||
# Get a single Group
|
||||
Scenario Outline: Get a single Group
|
||||
Given that I want to get a resource with the key "grp_uid" stored in session array as variable "grp_uid<i>"
|
||||
And I request "group"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And that "grp_title" is set to "<grp_title>"
|
||||
And that "grp_status" is set to "<grp_status>"
|
||||
And that "grp_users" is set to "<grp_users>"
|
||||
And that "grp_tasks" is set to "<grp_tasks>"
|
||||
|
||||
Examples:
|
||||
| i | grp_title | grp_status | grp_users | grp_tasks |
|
||||
| 0 | Demo Group1 for basic behat | INACTIVE | 0 | 0 |
|
||||
| 1 | Demo Group2 for basic behat | INACTIVE | 0 | 0 |
|
||||
|
||||
#DELETE /api/1.0/{workspace}/group/{grp_uid}
|
||||
# Delete Group
|
||||
Scenario Outline: Delete Group
|
||||
Given that I want to delete a resource with the key "grp_uid" stored in session array as variable "grp_uid<i>"
|
||||
And I request "group"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
| i |
|
||||
| 0 |
|
||||
| 1 |
|
||||
|
||||
#GET /api/1.0/{workspace}/groups?filter={filter}&start={start}&limit={limit}
|
||||
# Get list Groups
|
||||
Scenario: Get list Groups
|
||||
And I request "groups?filter=for basic behat"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the json data is an empty array
|
||||
|
||||
#GROUP - USER
|
||||
|
||||
#POST /api/1.0/{workspace}/group
|
||||
# Create new Group
|
||||
Scenario Outline: Create new Group
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"grp_title": "<grp_title>",
|
||||
"grp_status": "<grp_status>"
|
||||
}
|
||||
"""
|
||||
And I request "group"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 201
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And store "grp_uid" in session array as variable "grp_uid<i>"
|
||||
|
||||
Examples:
|
||||
| i | grp_title | grp_status |
|
||||
| 0 | Demo Group1 for basic behat | ACTIVE |
|
||||
|
||||
#POST /api/1.0/{workspace}/group/{grp_uid}/user
|
||||
# Assign User to Group
|
||||
Scenario Outline: Assign User to Group
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"usr_uid": "<usr_uid>"
|
||||
}
|
||||
"""
|
||||
And I request "group/grp_uid<i>/user" with the key "grp_uid<i>" stored in session array
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 201
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
| i | usr_uid |
|
||||
| 0 | 00000000000000000000000000000001 |
|
||||
|
||||
#GET /api/1.0/{workspace}/group/{grp_uid}/users?filter={filter}&start={start}&limit={limit}
|
||||
# List assigned Users to Group
|
||||
Scenario Outline: List assigned Users to Group
|
||||
And I request "group/grp_uid<i>/users" with the key "grp_uid<i>" stored in session array
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the "usr_uid" property in row <i> equals "<usr_uid>"
|
||||
And the "usr_username" property in row <i> equals "<usr_username>"
|
||||
And the "usr_status" property in row <i> equals "<usr_status>"
|
||||
|
||||
Examples:
|
||||
| i | usr_uid | usr_username | usr_status |
|
||||
| 0 | 00000000000000000000000000000001 | admin | ACTIVE |
|
||||
|
||||
#GET /api/1.0/{workspace}/group/{grp_uid}/available-users?filter={filter}&start={start}&limit={limit}
|
||||
# List available Users to assign to Group
|
||||
Scenario Outline: List available Users to assign to Group
|
||||
And I request "group/grp_uid<i>/available-users?filter=none" with the key "grp_uid<i>" stored in session array
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the json data is an empty array
|
||||
|
||||
Examples:
|
||||
| i |
|
||||
| 0 |
|
||||
|
||||
#DELETE /api/1.0/{workspace}/group/{grp_uid}/user/{usr_uid}
|
||||
# Unassign User of the Group
|
||||
Scenario Outline: Unassign User of the Group
|
||||
Given that I want to delete a resource with the key "obj_uid" stored in session array
|
||||
And I request "group/grp_uid<i>/user/<usr_uid>" with the key "grp_uid<i>" stored in session array
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
| i | usr_uid |
|
||||
| 0 | 00000000000000000000000000000001 |
|
||||
|
||||
#DELETE /api/1.0/{workspace}/group/{grp_uid}
|
||||
# Delete Group
|
||||
Scenario Outline: Delete Group
|
||||
Given that I want to delete a resource with the key "grp_uid" stored in session array as variable "grp_uid<i>"
|
||||
And I request "group"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
| i |
|
||||
| 0 |
|
||||
|
||||
#GET /api/1.0/{workspace}/groups?filter={filter}&start={start}&limit={limit}
|
||||
# Get list Groups
|
||||
Scenario: Get list Groups
|
||||
And I request "groups?filter=for basic behat"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the json data is an empty array
|
||||
|
||||
@@ -0,0 +1,236 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: PM Group Main Tests
|
||||
Requirements:
|
||||
a workspace with the 20 groups already loaded
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
Scenario Outline: Get list Groups of workspace using different filters
|
||||
And I request "groups?filter=<filter>&start=<start>&limit=<limit>"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be <http_code>
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has <records> records
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | filter | start | limit | records | http_code |
|
||||
| lowercase | admin | 0 | 9 | 2 | 200 |
|
||||
| uppercase | ADMIN | 0 | 9 | 2 | 200 |
|
||||
| limit=3 | a | 0 | 3 | 3 | 200 |
|
||||
| limit and start | a | 1 | 2 | 2 | 200 |
|
||||
| high number for start | a | 1000 | 1 | 0 | 200 |
|
||||
| high number for start | a | 1000 | 0 | 0 | 200 |
|
||||
| empty result | xyz | 0 | 0 | 0 | 200 |
|
||||
| empty string | | 0 | 10000 | 20 | 200 |
|
||||
| empty string | | 1 | 2 | 2 | 200 |
|
||||
| search 0 | 0 | 0 | 0 | 0 | 200 |
|
||||
| search 0 | 0 | 0 | 100 | 0 | 200 |
|
||||
| Search letters 'c' | c | 0 | 5 | 5 | 200 |
|
||||
| Search letters 'de | de | 0 | 5 | 2 | 200 |
|
||||
|
||||
|
||||
Scenario Outline: Create 3 new Groups
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"grp_title": "<grp_title>",
|
||||
"grp_status": "<grp_status>"
|
||||
}
|
||||
"""
|
||||
And I request "group"
|
||||
And the content type is "application/json"
|
||||
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 "grp_uid" in session array as variable "grp_uid_<grp_uid_number>"
|
||||
|
||||
Examples:
|
||||
|
||||
| grp_uid_number | grp_title | grp_status |
|
||||
| 0 | Demo Group1 for main behat | ACTIVE |
|
||||
| 1 | Demo Group2 for main behat | ACTIVE |
|
||||
| 2 | Demo Group3 for main behat | INACTIVE |
|
||||
|
||||
|
||||
Scenario: Get the Groups list when there are 23 records
|
||||
And I request "groups?filter=&start=0&limit=50"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 23 records
|
||||
|
||||
|
||||
Scenario Outline: Update Group and then check if the values had changed
|
||||
Given PUT this data:
|
||||
"""
|
||||
{
|
||||
"grp_title": "<grp_title>",
|
||||
"grp_status": "<grp_status>"
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "grp_uid" stored in session array as variable "grp_uid_<grp_uid_number>"
|
||||
And I request "group"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
|
||||
| grp_uid_number | grp_title | grp_status |
|
||||
| 0 | Update Demo Group1 for main behat | INACTIVE |
|
||||
| 1 | Update Demo Group2 for main behat | INACTIVE |
|
||||
| 2 | Update Demo Group3 for main behat | ACTIVE |
|
||||
|
||||
|
||||
Scenario Outline: Get a single Groups and check some properties
|
||||
Given that I want to get a resource with the key "grp_uid" stored in session array as variable "grp_uid_<grp_uid_number>"
|
||||
And I request "group"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And the "grp_title" property equals "<grp_title>"
|
||||
And the "grp_status" property equals "<grp_status>"
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
| grp_uid_number | grp_title | grp_status |
|
||||
| 0 | Update Demo Group1 for main behat | INACTIVE |
|
||||
| 1 | Update Demo Group2 for main behat | INACTIVE |
|
||||
| 2 | Update Demo Group3 for main behat | ACTIVE |
|
||||
|
||||
|
||||
#ASSIGN USER TO GROUP
|
||||
|
||||
Scenario Outline: Get list Users of workspace using different filters for a group
|
||||
And I request "group/36775342552d5674146d9c2078497230/users?filter=<filter>&start=<start>&limit=<limit>"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be <http_code>
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has <record> record
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | filter | start | limit | record | http_code |
|
||||
| lowercase | admin | 0 | 9 | 0 | 200 |
|
||||
| uppercase | ADMIN | 0 | 9 | 0 | 200 |
|
||||
| limit=3 | a | 0 | 60 | 37 | 200 |
|
||||
| limit and start | a | 1 | 2 | 2 | 200 |
|
||||
| high number for start | a | 1000 | 1 | 0 | 200 |
|
||||
| high number for start | a | 1000 | 0 | 0 | 200 |
|
||||
| empty result | xyz | 0 | 0 | 0 | 200 |
|
||||
| empty string | | 0 | 10000 | 43 | 200 |
|
||||
| empty string | | 1 | 2 | 2 | 200 |
|
||||
| search 0 | 0 | 0 | 0 | 0 | 200 |
|
||||
| search 0 | 0 | 0 | 100 | 0 | 200 |
|
||||
| Search letters 'c' | c | 0 | 40 | 21 | 200 |
|
||||
| Search letters 'de | de | 0 | 5 | 1 | 200 |
|
||||
|
||||
|
||||
Scenario Outline: Assign users to groups created from the endpoint
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"usr_uid": "<usr_uid>"
|
||||
}
|
||||
"""
|
||||
And I request "group/grp_uid/user" with the key "grp_uid" stored in session array as variable "grp_uid_<grp_uid_number>"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 201
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
| grp_uid_number | usr_uid |
|
||||
| 0 | 00000000000000000000000000000001 |
|
||||
| 1 | 51049032352d56710347233042615067 |
|
||||
| 2 | 25286582752d56713231082039265791 |
|
||||
|
||||
|
||||
Scenario Outline: List assigned Users to Group
|
||||
And I request "group/grp_uid/users" with the key "grp_uid" stored in session array as variable "grp_uid_<grp_uid_number>"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the "usr_uid" property in row 0 equals "<usr_uid>"
|
||||
And the "usr_username" property in row 0 equals "<usr_username>"
|
||||
And the "usr_status" property in row 0 equals "<usr_status>"
|
||||
|
||||
Examples:
|
||||
| grp_uid_number | usr_uid | usr_username | usr_status |
|
||||
| 0 | 00000000000000000000000000000001 | admin | ACTIVE |
|
||||
| 1 | 51049032352d56710347233042615067 | aaron | ACTIVE |
|
||||
| 2 | 25286582752d56713231082039265791 | amy | ACTIVE |
|
||||
|
||||
|
||||
Scenario Outline: List available Users to assign to Group
|
||||
And I request "group/grp_uid/available-users?filter=none" with the key "grp_uid" stored in session array as variable "grp_uid_<grp_uid_number>"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the json data is an empty array
|
||||
|
||||
Examples:
|
||||
| grp_uid_number |
|
||||
| 0 |
|
||||
| 1 |
|
||||
| 2 |
|
||||
|
||||
|
||||
Scenario Outline: Unassign User of the Group
|
||||
Given that I want to delete a resource with the key "<usr_uid>" stored in session array
|
||||
And I request "group/grp_uid/user/<usr_uid>" with the key "grp_uid" stored in session array as variable "grp_uid_<grp_uid_number>"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
|
||||
| grp_uid_number | usr_uid |
|
||||
| 0 | 00000000000000000000000000000001 |
|
||||
| 1 | 51049032352d56710347233042615067 |
|
||||
| 2 | 25286582752d56713231082039265791 |
|
||||
|
||||
|
||||
Scenario Outline: Delete all Group created previously in this script
|
||||
Given that I want to delete a resource with the key "grp_uid" stored in session array as variable "grp_uid_<grp_uid_number>"
|
||||
And I request "group"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
|
||||
| grp_uid_number |
|
||||
| 0 |
|
||||
| 1 |
|
||||
| 2 |
|
||||
|
||||
Scenario: Get list Groups
|
||||
And I request "groups?filter=Update Demo Gro"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the json data is an empty array
|
||||
|
||||
|
||||
Scenario: Get list Groups of workspace
|
||||
And I request "groups?filter=&start=0&limit=50"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 20 records
|
||||
@@ -0,0 +1,56 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: PM Group Negative Tests
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
Scenario Outline: Get list Groups of workspace using different filters with bad parameters (negative tests)
|
||||
And I request "groups?filter=<filter>&start=<start>&limit=<limit>"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be <error_code>
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | filter | start | limit | records | error_code |
|
||||
| Invalid start | a | b | c | 0 | 400 |
|
||||
| Invalid limit | a | 0 | c | 0 | 400 |
|
||||
| real numbers | a | 0.1 | 1.4599 | 0 | 400 |
|
||||
| real numbers | a | 1.5 | 1.4599 | 0 | 400 |
|
||||
| real numbers | a | 0.0 | 1.0 | 1 | 400 |
|
||||
| real numbers | a | 0.0 | 0.0 | 0 | 400 |
|
||||
|
||||
|
||||
Scenario Outline: Create new Group with bad parameters (negative tests)
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"grp_title": "<grp_title>",
|
||||
"grp_status": "<grp_status>"
|
||||
}
|
||||
"""
|
||||
And I request "group"
|
||||
Then the response status code should be <error_code>
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
|
||||
| grp_title | grp_uid_number | grp_status | grp_title | error_code | error_message |
|
||||
| Field required grp_title | 1 | ACTIVE | | 400 | grp_title |
|
||||
| Field required grp_status | 2 | | test | 400 | grp_status |
|
||||
| Create group with same name | 4 | ACTIVE | Employees | 400 | exists |
|
||||
|
||||
|
||||
|
||||
|
||||
Scenario: Assign users to groups exist in workspace with bad parameters (negative tests)
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"usr_uid": "0000000000000000444500000001"
|
||||
}
|
||||
"""
|
||||
And I request "group/66623507552d56742865613066097298/user"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 400
|
||||
And the response status message should have the following text "usr_uid"
|
||||
@@ -0,0 +1,175 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: User
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
#GET /api/1.0/{workspace}/users?filter=abc&start=0&limit=25
|
||||
# Get list Users
|
||||
Scenario: Get list Users
|
||||
And I request "users"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
|
||||
#GET /api/1.0/{workspace}/users?filter=abc&start=0&limit=25
|
||||
# Get list Users
|
||||
Scenario: Get list Users
|
||||
And I request "users?filter=for basic behat"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the json data is an empty array
|
||||
|
||||
#GET /api/1.0/{workspace}/user/{usr_uid}
|
||||
# Get list Users
|
||||
Scenario: Get list Users
|
||||
And I request "user/00000000000000000000000000000001"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
#Para que funcione este test, debe existir el archivo que se quiere subir
|
||||
#GET /api/1.0/{workspace}/user/{usr_uid}
|
||||
# Upload a image
|
||||
Scenario: Upload a image
|
||||
Given POST I want to upload the image "/home/wendy/photo/pic3.jpg" to user "00000000000000000000000000000001". Url "user/"
|
||||
|
||||
#POST /api/1.0/{workspace}/user
|
||||
# Create new User
|
||||
Scenario Outline: Create new User
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"usr_firstname": "<usr_firstname>",
|
||||
"usr_lastname": "<usr_lastname>",
|
||||
"usr_username": "<usr_username>",
|
||||
"usr_email": "<usr_email>",
|
||||
"usr_address": "",
|
||||
"usr_zip_code": "",
|
||||
"usr_country": "",
|
||||
"usr_city": "",
|
||||
"usr_location": "",
|
||||
"usr_phone": "",
|
||||
"usr_position": "",
|
||||
"usr_replaced_by": "",
|
||||
"usr_due_date": "<usr_due_date>",
|
||||
"usr_calendar": "",
|
||||
"usr_status": "<usr_status>",
|
||||
"usr_role": "<usr_role>",
|
||||
"usr_new_pass": "admin",
|
||||
"usr_cnf_pass": "admin"
|
||||
}
|
||||
"""
|
||||
And I request "user"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be <http_code>
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "<type>"
|
||||
|
||||
|
||||
Examples:
|
||||
|usr_firstname | usr_lastname | usr_username | usr_email | usr_due_date | usr_status | usr_role |http_code| type |
|
||||
|
||||
| | bbb | ab | ab@ab.com | 2014-02-10 | ACTIVE | PROCESSMAKER_MANAGER |400 |string|
|
||||
|
||||
|aaa | | ab | ab@ab.com | 2014-02-10 | ACTIVE | PROCESSMAKER_MANAGER |400 |string|
|
||||
|
||||
|aaa | bbb | | ab@ab.com | 2014-02-10 | ACTIVE | PROCESSMAKER_MANAGER |400 |string|
|
||||
|
||||
|aaa | bbb | ab | | 2014-02-10 | ACTIVE | PROCESSMAKER_MANAGER |400 |string|
|
||||
|
||||
|aaa | bbb | ab | ab@ab.com | | ACTIVE | PROCESSMAKER_MANAGER |400 |string|
|
||||
|
||||
|aaa | bbb | ab | ab@ab.com |2014-02-10 | | PROCESSMAKER_MANAGER |400 |string|
|
||||
|
||||
|aaa | bbb | ab | ab@ab.com |2014-02-10 | ACTIVE | |400 |string|
|
||||
|
||||
|
||||
#POST /api/1.0/{workspace}/user
|
||||
# Create new User
|
||||
Scenario Outline: Create new User
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"usr_firstname": "<usr_firstname>",
|
||||
"usr_lastname": "<usr_lastname>",
|
||||
"usr_username": "<usr_username>",
|
||||
"usr_email": "<usr_email>",
|
||||
"usr_address": "",
|
||||
"usr_zip_code": "",
|
||||
"usr_country": "",
|
||||
"usr_city": "",
|
||||
"usr_location": "",
|
||||
"usr_phone": "",
|
||||
"usr_position": "",
|
||||
"usr_replaced_by": "",
|
||||
"usr_due_date": "<usr_due_date>",
|
||||
"usr_calendar": "",
|
||||
"usr_status": "<usr_status>",
|
||||
"usr_role": "<usr_role>",
|
||||
"usr_new_pass": "admin",
|
||||
"usr_cnf_pass": "admin"
|
||||
}
|
||||
"""
|
||||
And I request "user"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be <http_code>
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "<type>"
|
||||
And store "usr_uid" in session array as variable "usr_uid"
|
||||
|
||||
Examples:
|
||||
|usr_firstname | usr_lastname | usr_username | usr_email | usr_due_date | usr_status | usr_role |http_code| type |
|
||||
|xxx | yyy | zzz | xy@zzz.com| 2014-02-20 | ACTIVE | PROCESSMAKER_MANAGER |201 |object|
|
||||
|
||||
|
||||
#PUT /api/1.0/{workspace}/user/{usr_uid}
|
||||
# Update User
|
||||
Scenario Outline: Update User
|
||||
Given PUT this data:
|
||||
"""
|
||||
{
|
||||
"usr_firstname": "<usr_firstname>",
|
||||
"usr_lastname": "<usr_lastname>",
|
||||
"usr_username": "<usr_username>",
|
||||
"usr_email": "<usr_email>",
|
||||
"usr_address": "",
|
||||
"usr_zip_code": "",
|
||||
"usr_country": "",
|
||||
"usr_city": "",
|
||||
"usr_location": "",
|
||||
"usr_phone": "",
|
||||
"usr_position": "",
|
||||
"usr_replaced_by": "",
|
||||
"usr_due_date": "<usr_due_date>",
|
||||
"usr_calendar": "",
|
||||
"usr_status": "<usr_status>",
|
||||
"usr_role": "<usr_role>",
|
||||
"usr_new_pass": "admin",
|
||||
"usr_cnf_pass": "admin"
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "usr_uid" stored in session array as variable "usr_uid"
|
||||
And I request "user"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be <http_code>
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "<type>"
|
||||
|
||||
Examples:
|
||||
|usr_firstname | usr_lastname | usr_username | usr_email | usr_due_date | usr_status | usr_role |http_code| type |
|
||||
|aaa | bbb | ccc | ab@ccc.com| 2014-06-22 | ACTIVE | PROCESSMAKER_OPERATOR |200 |object|
|
||||
|
||||
#DELETE /api/1.0/{workspace}/user/{usr_uid}
|
||||
# Delete User
|
||||
Scenario: Delete User
|
||||
Given that I want to delete a resource with the key "usr_uid" stored in session array as variable "usr_uid"
|
||||
And I request "user"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
|
||||
@@ -0,0 +1,234 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: User Main Tests
|
||||
Requirements:
|
||||
a workspace with the 63 users created already loaded
|
||||
there are one users Active Directory in the process
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
Scenario Outline: Get list Users of workspace using different filters
|
||||
And I request "users?filter=<filter>&start=<start>&limit=<limit>"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be <http_code>
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has <records> records
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | filter | start | limit | records | http_code |
|
||||
| lowercase | admin | 0 | 9 | 1 | 200 |
|
||||
| uppercase | ADMIN | 0 | 9 | 1 | 200 |
|
||||
| limit=3 | a | 0 | 3 | 3 | 200 |
|
||||
| limit and start | a | 1 | 2 | 2 | 200 |
|
||||
| high number for start | a | 1000 | 1 | 0 | 200 |
|
||||
| high number for start | a | 1000 | 0 | 0 | 200 |
|
||||
| empty result | xyz | 0 | 0 | 0 | 200 |
|
||||
| empty string | | 0 | 10000 | 63 | 200 |
|
||||
| empty string | | 1 | 2 | 2 | 200 |
|
||||
| search 0 | 0 | 0 | 0 | 0 | 200 |
|
||||
| search 0 | 0 | 0 | 100 | 0 | 200 |
|
||||
| Search letters 'c' | c | 0 | 5 | 5 | 200 |
|
||||
| Search letters 'de | de | 0 | 5 | 2 | 200 |
|
||||
| Search not created | for | 0 | 25 | 0 | 200 |
|
||||
|
||||
|
||||
Scenario: Get the users List when there are exactly 63 users
|
||||
And I request "users"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 63 records
|
||||
|
||||
|
||||
Scenario: Get list Users
|
||||
And I request "user/00000000000000000000000000000001"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And the "usr_username" property equals "admin"
|
||||
And the "usr_firstname" property equals "Administrator"
|
||||
|
||||
|
||||
Scenario Outline: Create new User
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"usr_firstname": "<usr_firstname>",
|
||||
"usr_lastname": "<usr_lastname>",
|
||||
"usr_username": "<usr_username>",
|
||||
"usr_email": "<usr_email>",
|
||||
"usr_address": "<usr_address>",
|
||||
"usr_zip_code": "<usr_zip_code>",
|
||||
"usr_country": "<usr_country>",
|
||||
"usr_city": "<usr_city>",
|
||||
"usr_location": "<usr_location>",
|
||||
"usr_phone": "<usr_phone>",
|
||||
"usr_position": "<usr_position>",
|
||||
"usr_replaced_by": "<usr_replaced_by>",
|
||||
"usr_due_date": "<usr_due_date>",
|
||||
"usr_calendar": "<usr_calendar>",
|
||||
"usr_status": "<usr_status>",
|
||||
"usr_role": "<usr_role>",
|
||||
"usr_new_pass": "<usr_new_pass>",
|
||||
"usr_cnf_pass": "<usr_cnf_pass>"
|
||||
}
|
||||
"""
|
||||
And I request "user"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 201
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And store "usr_uid" in session array as variable "usr_uid_<usr_number>"
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
| Test_description | usr_number | usr_firstname | usr_lastname | usr_username | usr_email | usr_address | usr_zip_code | usr_country | usr_city | usr_location | usr_phone | usr_position | usr_replaced_by | usr_due_date | usr_calendar | usr_status | usr_role | usr_new_pass | usr_cnf_pass |
|
||||
| Create without replaced by, calendar | 1 | jhon | smith | jhon | jhon@gmail.com | grenn #344 | 555-6555 | US | FL | MIA | 555-6655-555 | Gerencia | | 2016-02-15 | | ACTIVE | PROCESSMAKER_OPERATOR | sample | sample |
|
||||
| Create without calendar | 2 | will | carter | will | will@gmail.com | saim #45 | 555-6522 | BO | L | LPB | 23344444 | Adminsitracion | 44811996752d567110634a1013636964 | 2014-12-12 | | ACTIVE | PROCESSMAKER_MANAGER | sample | sample |
|
||||
| Create with all fields | 3 | saraah | sandler | saraah | saraah@gmail.com | laberh #985 | 555-9999 | AR | B | BUE | 2353643644 | Desarrollo | 61364466452d56711adb378002702791 | 2014-12-12 | 99159704252f501c63f8c58025859967 | ACTIVE | PROCESSMAKER_ADMIN | admin | admin |
|
||||
| Create user Inactive | 4 | daniela | perez | daniela | daniela@gmail.com | grenn #544 | 555-6565 | US | FL | MIA | 555-6655-555 | Gerencia | | 2016-02-15 | | INACTIVE | PROCESSMAKER_OPERATOR | sample | sample |
|
||||
| Create user Vacation | 5 | micaela | sanchez | micaela | micaela@gmail.com | sancjh #544 | 555-6652 | US | FL | MIA | 555-6655-555 | Gerencia | | 2016-02-15 | | VACATION | PROCESSMAKER_OPERATOR | sample | sample |
|
||||
|
||||
|
||||
Scenario Outline: Upload a image
|
||||
Given POST I want to upload the image "<usr_photo>" to user with the key "usr_uid" stored in session array as variable "usr_uid_<usr_number>". Url "user/"
|
||||
|
||||
Examples:
|
||||
|
||||
| Test_description | usr_number | usr_photo |
|
||||
| Create without replaced by, calendar | 1 | /home/wendy/photo/pic1.jpg |
|
||||
| Create without calendar | 2 | /home/wendy/photo/pic2.jpg |
|
||||
| Create with all fields | 3 | /home/wendy/photo/pic3.jpg |
|
||||
|
||||
|
||||
Scenario: Get the users List when there are exactly 63 users
|
||||
And I request "users"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 68 records
|
||||
|
||||
|
||||
|
||||
Scenario: Get the users List when there are exactly 63 users
|
||||
And I request "users"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 68 records
|
||||
|
||||
|
||||
Scenario Outline: Update User and then check if the values had changed
|
||||
Given PUT this data:
|
||||
"""
|
||||
{
|
||||
"usr_firstname": "<usr_firstname>",
|
||||
"usr_lastname": "<usr_lastname>",
|
||||
"usr_username": "<usr_username>",
|
||||
"usr_email": "<usr_email>",
|
||||
"usr_address": "<usr_address>",
|
||||
"usr_zip_code": "<usr_zip_code>",
|
||||
"usr_country": "<usr_country>",
|
||||
"usr_city": "<usr_city>",
|
||||
"usr_location": "<usr_location>",
|
||||
"usr_phone": "<usr_phone>",
|
||||
"usr_position": "<usr_position>",
|
||||
"usr_replaced_by": "<usr_replaced_by>",
|
||||
"usr_due_date": "<usr_due_date>",
|
||||
"usr_calendar": "<usr_calendar>",
|
||||
"usr_status": "<usr_status>",
|
||||
"usr_role": "<usr_role>",
|
||||
"usr_new_pass": "<usr_new_pass>",
|
||||
"usr_cnf_pass": "<usr_cnf_pass>"
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "usr_uid" stored in session array as variable "usr_uid_<usr_number>"
|
||||
And I request "user"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
|
||||
| Test_description | usr_number | usr_firstname | usr_lastname | usr_username | usr_email | usr_address | usr_zip_code | usr_country | usr_city | usr_location | usr_phone | usr_position | usr_replaced_by | usr_due_date | usr_calendar | usr_status | usr_role | usr_new_pass | usr_cnf_pass |
|
||||
| Update usr_calendar, usr_role | 1 | jhoohan | smith | jhoohan | jhon@gmail.com | grenn #344 | 555-6555 | US | FL | MIA | 555-6655-555 | Gerencia | | 2014-02-15 | 99159704252f501c63f8c58025859967 | ACTIVE | PROCESSMAKER_ADMIN | sample | sample |
|
||||
| Update usr_firstname, usr_lastname, usr_username | 2 | wilian | carters | wilian | will@gmail.com | saim #45 | 555-6522 | BO | L | LPB | 23344444 | Adminsitracion | 44811996752d567110634a1013636964 | 2014-12-12 | | ACTIVE | PROCESSMAKER_MANAGER | sample | sample |
|
||||
| Update usr_status | 3 | sarita | sandler | sarita | saraah@gmail.com | laberh #985 | 555-9999 | AR | B | BUE | 2353643644 | Desarrollo | 61364466452d56711adb378002702791 | 2014-12-12 | 99159704252f501c63f8c58025859967 | INACTIVE | PROCESSMAKER_ADMIN | admin | admin |
|
||||
|
||||
|
||||
Scenario Outline: Get a single Users and check some properties
|
||||
Given that I want to get a resource with the key "usr_uid" stored in session array as variable "usr_uid_<usr_number>"
|
||||
And I request "user"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And that "usr_firstname" is set to "<usr_firstname>"
|
||||
And that "usr_lastname" is set to "<usr_lastname>"
|
||||
And that "usr_username" is set to "<usr_username>"
|
||||
And that "usr_email" is set to "<usr_email>"
|
||||
And that "usr_address" is set to "<usr_address>"
|
||||
And that "usr_zip_code" is set to "<usr_zip_code>"
|
||||
And that "usr_country" is set to "<usr_country>"
|
||||
And that "usr_city" is set to "<usr_city>"
|
||||
And that "usr_location" is set to "<usr_location>"
|
||||
And that "usr_phone" is set to "<usr_phone>"
|
||||
And that "usr_position" is set to "<usr_position>"
|
||||
And that "usr_replaced_by" is set to "<usr_replaced_by>"
|
||||
And that "usr_due_date" is set to "<usr_due_date>"
|
||||
And that "usr_calendar" is set to "<usr_calendar>"
|
||||
And that "usr_status" is set to "<usr_status>"
|
||||
And that "usr_role" is set to "<usr_role>"
|
||||
And that "usr_new_pass" is set to "<usr_new_pass>"
|
||||
And that "usr_cnf_pass" is set to "<usr_cnf_pass>"
|
||||
|
||||
Examples:
|
||||
|
||||
| Test_description | usr_number | usr_firstname | usr_lastname | usr_username | usr_email | usr_address | usr_zip_code | usr_country | usr_city | usr_location | usr_phone | usr_position | usr_replaced_by | usr_due_date | usr_calendar | usr_status | usr_role | usr_new_pass | usr_cnf_pass |
|
||||
| Update usr_calendar, usr_role | 1 | jhoohan | smith | jhoohan | jhon@gmail.com | grenn #344 | 555-6555 | US | FL | MIA | 555-6655-555 | Gerencia | | 2016-02-15 | 99159704252f501c63f8c58025859967 | ACTIVE | PROCESSMAKER_ADMIN | sample | sample |
|
||||
| Update usr_firstname, usr_lastname, usr_username | 2 | wilian | carters | wilian | will@gmail.com | saim #45 | 555-6522 | BO | L | LPB | 23344444 | Adminsitracion | 44811996752d567110634a1013636964 | 2014-12-12 | | ACTIVE | PROCESSMAKER_MANAGER | sample | sample |
|
||||
| Update usr_status | 3 | sarita | sandler | sarita | saraah@gmail.com | laberh #985 | 555-9999 | AR | B | BUE | 2353643644 | Desarrollo | 61364466452d56711adb378002702791 | 2014-12-12 | 99159704252f501c63f8c58025859967 | INACTIVE | PROCESSMAKER_ADMIN | admin | admin |
|
||||
|
||||
|
||||
Scenario: Get the users List when there are exactly 63 users
|
||||
And I request "users"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 68 records
|
||||
|
||||
Scenario Outline: Delete all users created previously in this script
|
||||
Given that I want to delete a resource with the key "usr_uid" stored in session array as variable "usr_uid_<usr_number>"
|
||||
And I request "user"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
|
||||
| usr_number |
|
||||
| 1 |
|
||||
| 2 |
|
||||
| 3 |
|
||||
| 4 |
|
||||
| 5 |
|
||||
|
||||
|
||||
Scenario: Get the users List when there are exactly 63 users
|
||||
And I request "users"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 63 records
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: PM User Main Tests
|
||||
Requirements:
|
||||
a workspace with the 63 users created already loaded
|
||||
there are one users Active Directory in the process
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
Scenario Outline: Get list Users of workspace using different filters with bad parameters (negative tests)
|
||||
And I request "users?filter=<filter>&start=<start>&limit=<limit>"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be <error_code>
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | filter | start | limit | records | error_code |
|
||||
| Invalid start | a | b | c | 0 | 400 |
|
||||
| Invalid limit | a | 0 | c | 0 | 400 |
|
||||
| real numbers | a | 0.1 | 1.4599 | 0 | 400 |
|
||||
| real numbers | a | 1.5 | 1.4599 | 0 | 400 |
|
||||
|
||||
|
||||
Scenario Outline: Create new User with bad parameters (negative tests)
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"usr_firstname": "<usr_firstname>",
|
||||
"usr_lastname": "<usr_lastname>",
|
||||
"usr_username": "<usr_username>",
|
||||
"usr_email": "<usr_email>",
|
||||
"usr_address": "<usr_address>",
|
||||
"usr_zip_code": "<usr_zip_code>",
|
||||
"usr_country": "<usr_country>",
|
||||
"usr_city": "<usr_city>",
|
||||
"usr_location": "<usr_location>",
|
||||
"usr_phone": "<usr_phone>",
|
||||
"usr_position": "<usr_position>",
|
||||
"usr_replaced_by": "<usr_replaced_by>",
|
||||
"usr_due_date": "<usr_due_date>",
|
||||
"usr_calendar": "<usr_calendar>",
|
||||
"usr_status": "<usr_status>",
|
||||
"usr_role": "<usr_role>",
|
||||
"usr_new_pass": "<usr_new_pass>",
|
||||
"usr_cnf_pass": "<usr_cnf_pass>"
|
||||
}
|
||||
"""
|
||||
And I request "user"
|
||||
Then the response status code should be <error_code>
|
||||
And the type is "<type>"
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
| Test_description | usr_firstname | usr_lastname | usr_username | usr_email | usr_address | usr_zip_code | usr_country | usr_city | usr_location | usr_phone | usr_position | usr_replaced_by | usr_due_date | usr_calendar | usr_status | usr_role | usr_new_pass | usr_cnf_pass | error_code | type | error_message |
|
||||
| Invalid usr_email | jhon | smith | jhon | jhonsmith | grenn #344 | 555-6555 | US | FL | MIA | 555-6655-555 | Gerencia | | 2016-02-15 | | ACTIVE | PROCESSMAKER_OPERATOR | sample | sample | 400 | string | usr_email |
|
||||
| Invalid usr_country | will | carter | will | will@gmail.com | saim #45 | 555-6522 | BOLIVIA | L | LPB | 23344444 | Adminsitracion | 44811996752d567110634a1013636964 | 2014-12-12 | | ACTIVE | PROCESSMAKER_MANAGER | sample | sample | 400 | string | usr_country |
|
||||
| Invalid usr_city | saraah | sandler | saraah | saraah@gmail.com | laberh #985 | 555-9999 | AR | BOLIVIA | BUE | 2353643644 | Desarrollo | 61364466452d56711adb378002702791 | 2014-12-12 | 99159704252f501c63f8c58025859967 | ACTIVE | PROCESSMAKER_ADMIN | admin | admin | 400 | string | usr_city |
|
||||
| Invalid usr_location | daniela | perez | daniela | daniela@gmail.com | grenn #544 | 555-6565 | US | FL | MIAMI | 555-6655-555 | Gerencia | | 2016-02-15 | | INACTIVE | PROCESSMAKER_OPERATOR | sample | sample | 400 | string | usr_location |
|
||||
| Invalid usr_replaced_by | micaela | sanchez | micaela | micaela@gmail.com | sancjh #544 | 555-6652 | BO | L | LPB | 555-6655-555 | Gerencia | 61364466400000000000333333333333 | 2016-02-15 | | VACATION | PROCESSMAKER_OPERATOR | sample | sample | 400 | string | usr_replaced_by |
|
||||
| Invalid usr_due_date | jhon | smith | jhon | jhon@gmail.com | grenn #344 | 555-6555 | AR | B | BUE | 555-6655-555 | Gerencia | | sample | | ACTIVE | PROCESSMAKER_OPERATOR | sample | sample | 400 | string | usr_due_date |
|
||||
| Invalid usr_status | will | carter | will | will@gmail.com | saim #45 | 555-6522 | US | FL | MIA | 23344444 | Adminsitracion | 44811996752d567110634a1013636964 | 2014-12-12 | | INPUT | PROCESSMAKER_MANAGER | sample | sample | 400 | string | usr_status |
|
||||
| Invalid usr_role | saraah | sandler | saraah | saraah@gmail.com | laberh #985 | 555-9999 | BO | L | LPB | 2353643644 | Desarrollo | 61364466452d56711adb378002702791 | 2014-12-12 | 99159704252f501c63f8c58025859967 | ACTIVE | INPUT_DOCUMENT | admin | admin | 400 | string | usr_role |
|
||||
| Without usr_firstname | | perez | daniel | daniela@gmail.com | grenn #544 | 555-6565 | AR | B | BUE | 555-6655-555 | Gerencia | | 2016-02-15 | | INACTIVE | PROCESSMAKER_OPERATOR | sample | sample | 400 | string | usr_firstname |
|
||||
| Without usr_lastname | micaela | | brayan | micaela@gmail.com | sancjh #544 | 555-6652 | US | FL | MIA | 555-6655-555 | Gerencia | | 2016-02-15 | | VACATION | PROCESSMAKER_OPERATOR | sample | sample | 400 | string | usr_lastname |
|
||||
| Without usr_username | jhon | smith | | jhon@gmail.com | grenn #344 | 555-6555 | BO | L | LPB | 555-6655-555 | Gerencia | | 2016-02-15 | | ACTIVE | PROCESSMAKER_OPERATOR | sample | sample | 400 | string | usr_username |
|
||||
| Without usr_email | will | carter | herbert | | saim #45 | 555-6522 | AR | B | BUE | 23344444 | Adminsitracion | 44811996752d567110634a1013636964 | 2014-12-12 | | ACTIVE | PROCESSMAKER_MANAGER | sample | sample | 400 | string | usr_email |
|
||||
| Without usr_due_date | saraah | sandler | sarahh | saraah@gmail.com | laberh #985 | 555-9999 | US | FL | MIA | 2353643644 | Desarrollo | 61364466452d56711adb378002702791 | | 99159704252f501c63f8c58025859967 | ACTIVE | PROCESSMAKER_ADMIN | admin | admin | 400 | string | usr_due_date |
|
||||
| Without usr_status | daniela | perez | daniella | daniela@gmail.com | grenn #544 | 555-6565 | US | FL | MIA | 555-6655-555 | Gerencia | | 2016-02-15 | | | PROCESSMAKER_OPERATOR | sample | sample | 400 | string | usr_status |
|
||||
| Without usr_role | micaela | sanchez | micaeella | micaela@gmail.com | sancjh #544 | 555-6652 | BO | L | LPB | 555-6655-555 | Gerencia | | 2016-02-15 | | VACATION | | sample | sample | 400 | string | usr_role |
|
||||
| Wrong password | jhon | smith | jhon | jhon@gmail.com | grenn #344 | 555-6555 | AR | B | BUE | 555-6655-555 | Gerencia | | 2016-02-15 | | ACTIVE | PROCESSMAKER_OPERATOR | sample | igual | 400 | string | same |
|
||||
| Short length of the password | will | carter | will | will@gmail.com | saim #45 | 555-6522 | US | FL | MIA | 23344444 | Adminsitracion | 44811996752d567110634a1013636964 | 2014-12-12 | | ACTIVE | PROCESSMAKER_MANAGER | hol | hol | 400 | string | Minimum length |
|
||||
| Create with User exist | Peter | Vanko | peter | colosaqatest@gmail.com | | | | | | | | | 2016-02-15 | | ACTIVE | PROCESSMAKER_OPERATOR | sample | sample | 400 | string | exists |
|
||||
Reference in New Issue
Block a user