Were added some adjustments in order to make the tests are independents.

This commit is contained in:
m3ik0
2015-01-06 18:02:04 -04:00
parent b91aa7a820
commit 869896ae79
3 changed files with 127 additions and 109 deletions

View File

@@ -4,28 +4,24 @@ Feature: Process Category
a workspace with the workspace with one process category
Background:
Background:
Given that I have a valid access_token
Scenario: Get list of Categories
# GET /api/1.0/{workspace}/project/categories
# Get Category list
Scenario: Get list of Categories
Given I request "project/categories"
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 1 records
And the response has 0 records
Scenario: Get a Category specific
Given I request "project/category/4177095085330818c324501061677193"
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"
Scenario: Create a new Categories
# POST /api/1.0/{workspace}/project/category
# Create a new Category
Scenario: Create a new Category
Given POST this data:
"""
{
@@ -40,16 +36,20 @@ Scenario: Create a new Categories
And store "cat_uid" in session array as variable "cat_uid"
Scenario: Get list of Categories
# GET /api/1.0/{workspace}/project/categories
# Get Category list
Scenario: Get list of Categories
Given I request "project/categories"
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 2 records
And the response has 1 records
Scenario: Update the Category created in this script
# PUT /api/1.0/{workspace}/project/categories
# Update an specific Category
Scenario: Update the Category created in this script
Given PUT this data:
"""
{
@@ -63,10 +63,34 @@ Scenario: Update the Category created in this script
And the response charset is "UTF-8"
Scenario: Delete the Category created previously in this script
# GET /api/1.0/{workspace}/project/category/<category-id>
# Get an specific Category
Scenario: Get an specific Category
Given that I want to get a resource with the key "cat_uid" stored in session array
And I request "project/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"
# DELETE /api/1.0/{workspace}/project/category
# Delete an specific Category
Scenario: Delete the Category created previously in this script
Given that I want to delete a resource with the key "cat_uid" stored in session array
And I request "project/category"
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"
# GET /api/1.0/{workspace}/project/categories
# Get Category list
Scenario: Get list of Categories
Given I request "project/categories"
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 0 records

View File

@@ -4,31 +4,24 @@ Feature: Process Category Main Test
a workspace with the workspace with one process category
Background:
Background:
Given that I have a valid access_token
Scenario: Get list of Categories
# GET /api/1.0/{workspace}/project/categories
# Get Category list
Scenario: Get list of Categories
Given I request "project/categories"
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 1 records
And the response has 0 records
Scenario: Get a Category specific
Given I request "project/category/4177095085330818c324501061677193"
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 "cat_uid" property equals "4177095085330818c324501061677193"
And the "cat_name" property equals "Category Cases Lists"
And the "cat_total_processes" property equals 6
Scenario Outline: Create a new Categories
# POST /api/1.0/{workspace}/project/category
# Create a new Category
Scenario Outline: Create new Categories
Given POST this data:
"""
{
@@ -43,7 +36,6 @@ Scenario Outline: Create a new Categories
And store "cat_uid" in session array as variable "cat_uid_<cat_uid_number>"
Examples:
| test_description | cat_uid_number | cat_name |
| Create new Category with character special | 1 | sample!@#$%^^& |
| Create new Category with only character numeric | 2 | 32425325 |
@@ -51,9 +43,12 @@ Scenario Outline: Create a new Categories
| Create new Category with normal character | 4 | sample |
| Create new Category with short name | 5 | s |
| Create new Category with long name | 6 | Prueba de Creacion de nuevo categoria con nombre largo |
| Create new Category with long name | 7 | Right Category |
Scenario: Get list of Categories
# GET /api/1.0/{workspace}/project/categories
# Get Category list
Scenario: Get list of Categories
Given I request "project/categories"
Then the response status code should be 200
And the response charset is "UTF-8"
@@ -62,7 +57,9 @@ Scenario: Get list of Categories
And the response has 7 records
Scenario: Create Category with same name
# POST /api/1.0/{workspace}/project/category
# Create a new Category
Scenario: Create Category with same name twice
Given POST this data:
"""
{
@@ -74,7 +71,9 @@ Scenario: Create Category with same name
And the response status message should have the following text "exist"
Scenario Outline: Update the Category created in this script
# PUT /api/1.0/{workspace}/project/categories
# Update an specific Category
Scenario Outline: Update the Categories created in this script
Given PUT this data:
"""
{
@@ -86,15 +85,15 @@ Scenario Outline: Update the Category created in this script
Then the response status code should be 200
And the response charset is "UTF-8"
Examples:
| test_description | cat_uid_number | cat_name |
| Update Category | 1 | UPDATE sample!@#$%^^& |
| Update Category | 2 | UPDATE 32425325 |
Scenario Outline: Update the Category putting the same name
# PUT /api/1.0/{workspace}/project/categories
# Update an specific Category
Scenario Outline: Update the Category putting the same name
Given PUT this data:
"""
{
@@ -106,21 +105,20 @@ Scenario Outline: Update the Category putting the same name
And the response status message should have the following text "exist"
Examples:
| test_description | cat_uid_number | cat_name |
| Update Category | 5 | sample |
Scenario Outline: Get a Category specific
# GET /api/1.0/{workspace}/project/categories
# Get an specific Category
Scenario Outline: Get an specific Category
Given I request "project/category/cat_uid" with the key "cat_uid" stored in session array as variable "cat_uid_<cat_uid_number>"
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 "cat_name" property equals "<cat_name>"
And the "cat_total_processes" property equals <cat_total_processes>
And the "cat_total_processes" property equals "<cat_total_processes>"
Examples:
@@ -129,7 +127,9 @@ Scenario Outline: Get a Category specific
| 2 | UPDATE 32425325 | 0 |
Scenario Outline: Delete the Category created previously in this script
# DELETE /api/1.0/{workspace}/project/category
# Delete an specific Category
Scenario Outline: Delete the Category created previously in this script
Given that I want to delete a resource with the key "cat_uid" stored in session array as variable "cat_uid_<cat_uid_number>"
And I request "project/category"
And the content type is "application/json"
@@ -138,7 +138,6 @@ Scenario Outline: Delete the Category created previously in this script
And the type is "object"
Examples:
| cat_uid_number |
| 1 |
| 2 |
@@ -146,22 +145,15 @@ Scenario Outline: Delete the Category created previously in this script
| 4 |
| 5 |
| 6 |
| 7 |
Scenario: Get list of Categories
# GET /api/1.0/{workspace}/project/categories
# Get Category list
Scenario: Get list of Categories
Given I request "project/categories"
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 1 records
Scenario: Get a Category specific
Given I request "project/category/4177095085330818c324501061677193"
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 "cat_uid" property equals "4177095085330818c324501061677193"
And the "cat_name" property equals "Category Cases Lists"
And the "cat_total_processes" property equals 6
And the response has 0 records

View File

@@ -2,11 +2,13 @@
Feature: Process Category Negative Tests
Background:
Background:
Given that I have a valid access_token
Scenario Outline: Create a new Categories (Negative Test)
# POST /api/1.0/{workspace}/project/category
# Create a new Category
Scenario Outline: Create a new Category (Negative Test)
Given POST this data:
"""
{
@@ -18,14 +20,14 @@ Scenario Outline: Create a new Categories (Negative Test)
And the response status message should have the following text "<error_message>"
Examples:
| test_description | cat_name | error_code | error_message |
| without name | | 400 | cat_name |
Scenario: Delete the Category when it is assigned to a project "Category Cases Lists"
# DELETE /api/1.0/{workspace}/project/category
# Delete an specific Category
Scenario: Delete the Category when it is assigned to a project "Category Cases Lists"
Given that I want to delete a "Category"
And I request "project/category/4177095085330818c324501061677193"
Then the response status code should be 400
And the response status message should have the following text "cannot be deleted"
And the response status message should have the following text "does not exist"