Parametrización de los parámetros de conexión a la base de datos declarados en behat.yml y enviados mediante los features.

This commit is contained in:
veronicaaruquipa
2014-12-08 09:11:13 -04:00
parent 274e865060
commit d502648664
6 changed files with 543 additions and 587 deletions

View File

@@ -9,25 +9,30 @@ Feature: DataBase Connections
And the response has 0 record
Scenario: Create a new database connection
Scenario Outline: Create a new database connection
Given that I have a valid access_token
And POST this data:
"""
{
"dbs_type": "mysql",
"dbs_server": "michelangelo-be.colosa.net",
"dbs_database_name": "test",
"dbs_username": "testuser",
"dbs_password": "sample",
"dbs_port": 3306,
"dbs_encode": "utf8",
"dbs_description": "conection correcta"
{
"dbs_type": "<dbs_type>",
"dbs_server": "<dbs_server>",
"dbs_database_name": "<dbs_database_name>",
"dbs_username": "<dbs_username>",
"dbs_password": "<dbs_password>",
"dbs_port": <dbs_port>,
"dbs_encode": "<dbs_encode>",
"dbs_description": "<dbs_description>"
}
"""
And I request "project/74737540052e1641ab88249082085472/database-connection"
Then the response status code should be 201
And store "dbs_uid" in session array
Examples:
| dbs_type | dbs_server | dbs_database_name | dbs_username | dbs_password | dbs_port | dbs_encode | dbs_description |
| <mys_db_type> | <mys_db_server> | <mys_db_name> | <mys_db_username> | <mys_db_password> | <mys_db_port> | <mys_db_encode> | <mys_db_description> |
@3: TEST FOR GET DATABASE CONNECTIONS /----------------------------------------------------------------------
Scenario: List all the database connections (result 1 database connection)
Given that I have a valid access_token
@@ -37,19 +42,19 @@ Feature: DataBase Connections
And the response has 1 record
@4: TEST FOR PUT DATABASE CONNECTION /-----------------------------------------------------------------------
Scenario: Update a database connection
Scenario Outline: Update a database connection
Given that I have a valid access_token
And PUT this data:
"""
{
"dbs_type": "mysql",
"dbs_server": "michelangelo-be.colosa.net",
"dbs_database_name": "test",
"dbs_username": "testuser",
"dbs_password": "sample",
"dbs_port": 3306,
"dbs_encode": "utf8",
"dbs_description": "conection correcta a workflow"
{
"dbs_type": "<dbs_type>",
"dbs_server": "<dbs_server>",
"dbs_database_name": "<dbs_database_name>",
"dbs_username": "<dbs_username>",
"dbs_password": "<dbs_password>",
"dbs_port": <dbs_port>,
"dbs_encode": "<dbs_encode>",
"dbs_description": "<dbs_description>"
}
"""
And that I want to update a resource with the key "dbs_uid" stored in session array
@@ -58,6 +63,10 @@ Feature: DataBase Connections
And the response charset is "UTF-8"
And the type is "object"
Examples:
| dbs_type | dbs_server | dbs_database_name | dbs_username | dbs_password | dbs_port | dbs_encode | dbs_description |
| <mys_db_type> | <mys_db_server> | <mys_db_name> | <mys_db_username> | <mys_db_password> | <mys_db_port> | <mys_db_encode> | <mys_db_description> |
Scenario: Get a database connection (with change in "dbs_description" and "dbs_database_name")
Given that I have a valid access_token