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

View File

@@ -1,29 +1,34 @@
@ProcessMakerMichelangelo @RestAPI
Feature: DataBase Connections Main Tests MySQL
Feature: DataBase Connections Main Tests Mysql
Requirements:
a workspace with the process 74737540052e1641ab88249082085472 ("Data Base Connenctions") already loaded
and workspace with the project 87648819953a85c0abc01d3080475981 ("testExecutionOfDerivationScreen") already loaded
there are zero Database Connections in the process
A workspace with previous creation of process with ID=74737540052e1641ab88249082085472 ("Data Base Connections") already loaded
and workspace with the project 87648819953a85c0abc01d3080475981 ("testExecutionOfDerivationScreen") already loaded
there are zero Database Connections in the processes.
Background:
Background:
Given that I have a valid access_token
Scenario Outline: Get the DataBase Connections List when there are exactly zero DataBase Connections
Given I request "project/<project>/database-connections"
Then the response status code should be 200
And the response charset is "UTF-8"
And the response has <record> record
Examples:
# GET /api/1.0/{workspace}/project/<project-id>/database-connections
# Get list DataBase Connections
Scenario Outline: Get the DataBase Connections List when there are exactly zero DataBase Connections
Given I request "project/<project>/database-connections"
Then the response status code should be 200
And the response charset is "UTF-8"
And the response has <record> record
| test_description | project | record |
| List DB in the process Data Base Connenctions .pm | 74737540052e1641ab88249082085472 | 0 |
| List DB in the process testExecutionOfDerivationScreen .pmx | 87648819953a85c0abc01d3080475981 | 0 |
Examples:
Scenario Outline: Test database connection to test
Given POST this data:
"""
| project | record |
| 74737540052e1641ab88249082085472 | 1 |
| 87648819953a85c0abc01d3080475981 | 1 |
# POST /api/1.0/{workspace}/project/<project-id>/database-connection/test
# Test DataBase Connection
Scenario Outline: Test database connection to test
Given POST this data:
"""
{
"dbs_type": "<dbs_type>",
"dbs_server": "<dbs_server>",
@@ -35,138 +40,13 @@ Feature: DataBase Connections Main Tests MySQL
"dbs_description": "<dbs_description>"
}
"""
And I request "project/<project>/database-connection/test"
Then if database-connection with id "<dbs_uid_number>" is active
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
Examples:
And I request "project/<project>/database-connection/test"
Then database-connection with id "<dbs_uid_number>" is active
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
| test_description | dbs_uid_number | project | dbs_type | dbs_server | dbs_database_name | dbs_username | dbs_password | dbs_port | dbs_encode | dbs_description |
| Test SQL Server db connection .pm | 1 | 74737540052e1641ab88249082085472 | microsoft sql server | 192.168.11.99 | wf_michelangelo | sa | mafe12345 | 1433 | utf8 | SQL Server connection |
| Test SQL Server db connection .pmx | 2 | 87648819953a85c0abc01d3080475981 | microsoft sql server | 192.168.11.99 | wf_michelangelo | sa | mafe12345 | 1433 | utf8 | SQL Server connection |
Scenario Outline: Create a new database connection
Given database-connection with id "<dbs_uid_number>" is active
And POST this data:
"""
{
"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/<project>/database-connection"
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 "dbs_uid" in session array as variable "dbs_uid_<dbs_uid_number>"
Examples:
| test_description | dbs_uid_number | project | dbs_type | dbs_server | dbs_database_name | dbs_username | dbs_password | dbs_port | dbs_encode | dbs_description |
| Create SQL Server db connection .pm | 1 | 74737540052e1641ab88249082085472 | mssql | 192.168.11.99 | wf_michelangelo | sa | mafe12345 | 1433 | utf8 | SQL Server connection |
| Create SQL Server db connection .pmx | 2 | 87648819953a85c0abc01d3080475981 | mssql | 192.168.11.99 | wf_michelangelo | sa | mafe12345 | 1433 | utf8 | SQL Server connection |
Scenario Outline: Get the DataBase Connections List when there are exactly one DataBase Connections in each process
Given database-connection with id "<dbs_uid_number>" is active
And I request "project/<project>/database-connections"
Then the response status code should be 200
And the response charset is "UTF-8"
And the response has <record> record
Examples:
| test_description | project | record | dbs_uid_number |
| List DB in the process Data Base Connenctions .pm | 74737540052e1641ab88249082085472 | 1 | 1 |
| List DB in the process testExecutionOfDerivationScreen .pmx | 87648819953a85c0abc01d3080475981 | 1 | 2 |
Scenario Outline: Update a database connection
Given database-connection with id "<dbs_uid_number>" is active
And PUT this data:
"""
{
"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 as variable "dbs_uid_<dbs_uid_number>"
And I request "project/<project>/database-connection"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "object"
Examples:
| test_description | dbs_uid_number | project | dbs_type | dbs_server | dbs_database_name | dbs_username | dbs_password | dbs_port | dbs_encode | dbs_description |
| Update sql server db connection .pm | 1 | 74737540052e1641ab88249082085472 | mssql | 192.168.11.99 | wf_michelangelo | sa | mafe12345 | 1433 | utf8 | update SQL Server connection |
| Update sql server db connection .pmx | 2 | 87648819953a85c0abc01d3080475981 | mssql | 192.168.11.99 | wf_michelangelo | sa | mafe12345 | 1433 | utf8 | update SQL Server connection |
Scenario Outline: Get a single database connection and check some properties
Given database-connection with id "<dbs_uid_number>" is active
And that I want to get a resource with the key "dbs_uid" stored in session array as variable "dbs_uid_<dbs_uid_number>"
And I request "project/<project>/database-connection"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "object"
And that "dbs_type" is set to "<dbs_type>"
And that "dbs_server" is set to "<dbs_server>"
And that "dbs_database_name" is set to "<dbs_database_name>"
And that "dbs_username" is set to "<dbs_username>"
And that "dbs_password" is set to "<dbs_password>"
And that "dbs_port" is set to "<dbs_port>"
And that "dbs_encode" is set to "<dbs_encode>"
And that "dbs_description" is set to "<dbs_description>"
Examples:
| test_description | dbs_uid_number | project | dbs_type | dbs_server | dbs_database_name | dbs_username | dbs_password | dbs_port | dbs_encode | dbs_description |
| Update sql server db connection .pm | 1 | 74737540052e1641ab88249082085472 | mssql | 192.168.11.99 | wf_michelangelo | sa | mafe12345 | 1433 | utf8 | update SQL Server connection |
| Update sql server db connection .pmx | 2 | 87648819953a85c0abc01d3080475981 | mssql | 192.168.11.99 | wf_michelangelo | sa | mafe12345 | 1433 | utf8 | update SQL Server connection |
Scenario Outline: Delete all Database Connection created previously in this script
Given database-connection with id "<dbs_uid_number>" is active
And that I want to delete a resource with the key "dbs_uid" stored in session array as variable "dbs_uid_<dbs_uid_number>"
And I request "project/<project>/database-connection"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "object"
Examples:
| project | dbs_uid_number |
| 74737540052e1641ab88249082085472 | 1 |
| 87648819953a85c0abc01d3080475981 | 2 |
Scenario Outline: Get the DataBase Connections List when there are exactly zero DataBase Connections
Given database-connection with id "<dbs_uid_number>" is active
And I request "project/<project>/database-connections"
Then the response status code should be 200
And the response charset is "UTF-8"
And the response has <record> record
Examples:
| test_description | project | record | dbs_uid_number |
| List DB in the process Data Base Connenctions .pm | 74737540052e1641ab88249082085472 | 0 | 1 |
| List DB in the process testExecutionOfDerivationScreen .pmx | 87648819953a85c0abc01d3080475981 | 0 | 2 |
Examples:
| dbs_uid_number | project | dbs_type | dbs_server | dbs_database_name | dbs_username | dbs_password | dbs_port | dbs_encode | dbs_description |
| 46110938554821d2ddb8d01076533986 | 74737540052e1641ab88249082085472 | <mys_db_type> | <mys_db_server> | <mys_db_name> | <mys_db_username> | <mys_db_password> | <mys_db_port> | <mys_db_encode> | <mys_db_description> |
| 40639901154821d2e3bb7e8061116901 | 87648819953a85c0abc01d3080475981 | <mys_db_type> | <mys_db_server> | <mys_db_name> | <mys_db_username> | <mys_db_password> | <mys_db_port> | <mys_db_encode> | <mys_db_description> |

View File

@@ -1,29 +1,33 @@
@ProcessMakerMichelangelo @RestAPI
Feature: DataBase Connections Main Tests SQL Server
Requirements:
a workspace with the process 74737540052e1641ab88249082085472 ("Data Base Connenctions") already loaded
and workspace with the project 87648819953a85c0abc01d3080475981 ("testExecutionOfDerivationScreen") already loaded
there are zero Database Connections in the processes
A workspace with previous creation of process with ID=74737540052e1641ab88249082085472 ("Data Base Connections") already loaded
and workspace with the project 87648819953a85c0abc01d3080475981 ("testExecutionOfDerivationScreen") already loaded
there are zero Database Connections in the processes.
Background:
Background:
Given that I have a valid access_token
Scenario Outline: Get the DataBase Connections List when there are exactly zero DataBase Connections
Given I request "project/<project>/database-connections"
Then the response status code should be 200
And the response charset is "UTF-8"
And the response has <record> record
Examples:
# GET /api/1.0/{workspace}/project/<project-id>/database-connections
# Get list DataBase Connections
Scenario Outline: Get the DataBase Connections List when there are exactly zero DataBase Connections
Given I request "project/<project>/database-connections"
Then the response status code should be 200
And the response charset is "UTF-8"
And the response has <record> record
| test_description | project | record |
| List DB in the process Data Base Connenctions .pm | 74737540052e1641ab88249082085472 | 0 |
| List DB in the process testExecutionOfDerivationScreen .pmx | 87648819953a85c0abc01d3080475981 | 0 |
Examples:
| project | record |
| 106912358530c9b14ac15d3001790900 | 0 |
| 1265557095225ff5c688f46031700471 | 0 |
Scenario Outline: Test database connection to test
Given POST this data:
"""
# POST /api/1.0/{workspace}/project/<project-id>/database-connection/test
# Test DataBase Connection
Scenario Outline: Test database connection to test
Given POST this data:
"""
{
"dbs_type": "<dbs_type>",
"dbs_server": "<dbs_server>",
@@ -35,23 +39,24 @@ Feature: DataBase Connections Main Tests SQL Server
"dbs_description": "<dbs_description>"
}
"""
And I request "project/<project>/database-connection/test"
Then if database-connection with id "<dbs_uid_number>" is active
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
Examples:
And I request "project/<project>/database-connection/test"
Then if database-connection with id "<dbs_uid_number>" is active
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
| test_description | dbs_uid_number | project | dbs_type | dbs_server | dbs_database_name | dbs_username | dbs_password | dbs_port | dbs_encode | dbs_description |
| Test SQL Server db connection .pm | 1 | 74737540052e1641ab88249082085472 | microsoft sql server | 192.168.11.99 | wf_michelangelo | sa | mafe12345 | 1433 | utf8 | SQL Server connection |
| Test SQL Server db connection .pmx | 2 | 87648819953a85c0abc01d3080475981 | microsoft sql server | 192.168.11.99 | wf_michelangelo | sa | mafe12345 | 1433 | utf8 | SQL Server connection |
Examples:
| dbs_uid_number | project | dbs_type | dbs_server | dbs_database_name | dbs_username | dbs_password | dbs_port | dbs_encode | dbs_description |
| 1 | 106912358530c9b14ac15d3001790900 | <sqlsrv_db_type> | <sqlsrv_db_server> | <sqlsrv_db_name> | <sqlsrv_db_username> | <sqlsrv_db_password> | <sqlsrv_db_port> | <sqlsrv_db_encode> | <sqlsrv_db_description> |
| 2 | 1265557095225ff5c688f46031700471 | <sqlsrv_db_type> | <sqlsrv_db_server> | <sqlsrv_db_name> | <sqlsrv_db_username> | <sqlsrv_db_password> | <sqlsrv_db_port> | <sqlsrv_db_encode> | <sqlsrv_db_description> |
Scenario Outline: Create a new database connection
Given database-connection with id "<dbs_uid_number>" is active
And POST this data:
"""
# POST /api/1.0/{workspace}/project/<project-id>/database-connection
# Create new DataBase Connection
Scenario Outline: Create a new database connection
Given database-connection with id "<dbs_uid_number>" is active
And POST this data:
"""
{
"dbs_type": "<dbs_type>",
"dbs_server": "<dbs_server>",
@@ -63,38 +68,40 @@ Feature: DataBase Connections Main Tests SQL Server
"dbs_description": "<dbs_description>"
}
"""
And I request "project/<project>/database-connection"
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 "dbs_uid" in session array as variable "dbs_uid_<dbs_uid_number>"
And I request "project/<project>/database-connection"
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 "dbs_uid" in session array as variable "dbs_uid_<dbs_uid_number>"
Examples:
| test_description | dbs_uid_number | project | dbs_type | dbs_server | dbs_database_name | dbs_username | dbs_password | dbs_port | dbs_encode | dbs_description |
| Create SQL Server db connection .pm | 1 | 74737540052e1641ab88249082085472 | mssql | 192.168.11.99 | wf_michelangelo | sa | mafe12345 | 1433 | utf8 | SQL Server connection |
| Create SQL Server db connection .pmx | 2 | 87648819953a85c0abc01d3080475981 | mssql | 192.168.11.99 | wf_michelangelo | sa | mafe12345 | 1433 | utf8 | SQL Server connection |
Examples:
| dbs_uid_number | project | dbs_type | dbs_server | dbs_database_name | dbs_username | dbs_password | dbs_port | dbs_encode | dbs_description |
| 1 | 106912358530c9b14ac15d3001790900 | <sqlsrv_db_type> | <sqlsrv_db_server> | <sqlsrv_db_name> | <sqlsrv_db_username> | <sqlsrv_db_password> | <sqlsrv_db_port> | <sqlsrv_db_encode> | <sqlsrv_db_description> |
| 2 | 1265557095225ff5c688f46031700471 | <sqlsrv_db_type> | <sqlsrv_db_server> | <sqlsrv_db_name> | <sqlsrv_db_username> | <sqlsrv_db_password> | <sqlsrv_db_port> | <sqlsrv_db_encode> | <sqlsrv_db_description> |
Scenario Outline: Get the DataBase Connections List when there are exactly one DataBase Connections in each process
Given database-connection with id "<dbs_uid_number>" is active
And I request "project/<project>/database-connections"
Then the response status code should be 200
And the response charset is "UTF-8"
And the response has <record> record
# GET /api/1.0/{workspace}/project/<project-id>/database-connection
# Get DataBase Connections list of each process
Scenario Outline: Get the DataBase Connections List when there are exactly one DataBase Connections in each process
Given database-connection with id "<dbs_uid_number>" is active
And I request "project/<project>/database-connections"
Then the response status code should be 200
And the response charset is "UTF-8"
And the response has <record> record
Examples:
Examples:
| project | record | dbs_uid_number |
| 106912358530c9b14ac15d3001790900 | 1 | 1 |
| 1265557095225ff5c688f46031700471 | 1 | 2 |
| test_description | project | record | dbs_uid_number |
| List DB in the process Data Base Connenctions .pm | 74737540052e1641ab88249082085472 | 1 | 1 |
| List DB in the process testExecutionOfDerivationScreen .pmx | 87648819953a85c0abc01d3080475981 | 1 | 2 |
Scenario Outline: Update a database connection
Given database-connection with id "<dbs_uid_number>" is active
And PUT this data:
"""
# PUT /api/1.0/{workspace}/project/<project-id>/database-connection
# Update a DataBase Connection
Scenario Outline: Update a database connection
Given database-connection with id "<dbs_uid_number>" is active
And PUT this data:
"""
{
"dbs_type": "<dbs_type>",
"dbs_server": "<dbs_server>",
@@ -106,66 +113,68 @@ Feature: DataBase Connections Main Tests SQL Server
"dbs_description": "<dbs_description>"
}
"""
And that I want to update a resource with the key "dbs_uid" stored in session array as variable "dbs_uid_<dbs_uid_number>"
And I request "project/<project>/database-connection"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "object"
And that I want to update a resource with the key "dbs_uid" stored in session array as variable "dbs_uid_<dbs_uid_number>"
And I request "project/<project>/database-connection"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "object"
Examples:
| test_description | dbs_uid_number | project | dbs_type | dbs_server | dbs_database_name | dbs_username | dbs_password | dbs_port | dbs_encode | dbs_description |
| Update sql server db connection .pm | 1 | 74737540052e1641ab88249082085472 | mssql | 192.168.11.99 | wf_michelangelo | sa | mafe12345 | 1433 | utf8 | update SQL Server connection |
| Update sql server db connection .pmx | 2 | 87648819953a85c0abc01d3080475981 | mssql | 192.168.11.99 | wf_michelangelo | sa | mafe12345 | 1433 | utf8 | update SQL Server connection |
Examples:
| dbs_uid_number | project | dbs_type | dbs_server | dbs_database_name | dbs_username | dbs_password | dbs_port | dbs_encode | dbs_description |
| 1 | 106912358530c9b14ac15d3001790900 | <sqlsrv_db_type> | <sqlsrv_db_server> | <sqlsrv_db_name> | <sqlsrv_db_username> | <sqlsrv_db_password> | <sqlsrv_db_port> | <sqlsrv_db_encode> | <sqlsrv_db_description> |
| 2 | 1265557095225ff5c688f46031700471 | <sqlsrv_db_type> | <sqlsrv_db_server> | <sqlsrv_db_name> | <sqlsrv_db_username> | <sqlsrv_db_password> | <sqlsrv_db_port> | <sqlsrv_db_encode> | <sqlsrv_db_description> |
Scenario Outline: Get a single database connection and check some properties
Given database-connection with id "<dbs_uid_number>" is active
And that I want to get a resource with the key "dbs_uid" stored in session array as variable "dbs_uid_<dbs_uid_number>"
And I request "project/<project>/database-connection"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "object"
And that "dbs_type" is set to "<dbs_type>"
And that "dbs_server" is set to "<dbs_server>"
And that "dbs_database_name" is set to "<dbs_database_name>"
And that "dbs_username" is set to "<dbs_username>"
And that "dbs_password" is set to "<dbs_password>"
And that "dbs_port" is set to "<dbs_port>"
And that "dbs_encode" is set to "<dbs_encode>"
And that "dbs_description" is set to "<dbs_description>"
# GET /api/1.0/{workspace}/project/<project-id>/database-connection
# Get a single DataBase Connection and their properties
Scenario Outline: Get a single database connection and check some properties
Given database-connection with id "<dbs_uid_number>" is active
And that I want to get a resource with the key "dbs_uid" stored in session array as variable "dbs_uid_<dbs_uid_number>"
And I request "project/<project>/database-connection"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "object"
And that "dbs_type" is set to "<dbs_type>"
And that "dbs_server" is set to "<dbs_server>"
And that "dbs_database_name" is set to "<dbs_database_name>"
And that "dbs_username" is set to "<dbs_username>"
And that "dbs_password" is set to "<dbs_password>"
And that "dbs_port" is set to "<dbs_port>"
And that "dbs_encode" is set to "<dbs_encode>"
And that "dbs_description" is set to "<dbs_description>"
Examples:
| test_description | dbs_uid_number | project | dbs_type | dbs_server | dbs_database_name | dbs_username | dbs_password | dbs_port | dbs_encode | dbs_description |
| Update sql server db connection .pm | 1 | 74737540052e1641ab88249082085472 | mssql | 192.168.11.99 | wf_michelangelo | sa | mafe12345 | 1433 | utf8 | update SQL Server connection |
| Update sql server db connection .pmx | 2 | 87648819953a85c0abc01d3080475981 | mssql | 192.168.11.99 | wf_michelangelo | sa | mafe12345 | 1433 | utf8 | update SQL Server connection |
Examples:
| dbs_uid_number | project | dbs_type | dbs_server | dbs_database_name | dbs_username | dbs_password | dbs_port | dbs_encode | dbs_description |
| 1 | 106912358530c9b14ac15d3001790900 | <sqlsrv_db_type> | <sqlsrv_db_server> | <sqlsrv_db_name> | <sqlsrv_db_username> | <sqlsrv_db_password> | <sqlsrv_db_port> | <sqlsrv_db_encode> | <sqlsrv_db_description> |
| 2 | 1265557095225ff5c688f46031700471 | <sqlsrv_db_type> | <sqlsrv_db_server> | <sqlsrv_db_name> | <sqlsrv_db_username> | <sqlsrv_db_password> | <sqlsrv_db_port> | <sqlsrv_db_encode> | <sqlsrv_db_description> |
Scenario Outline: Delete all Database Connection created previously in this script
Given database-connection with id "<dbs_uid_number>" is active
And that I want to delete a resource with the key "dbs_uid" stored in session array as variable "dbs_uid_<dbs_uid_number>"
And I request "project/<project>/database-connection"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "object"
# DELETE /api/1.0/{workspace}/project/<project-id>/database-connection
# Delete all DataBase Connections created in this script
Scenario Outline: Delete all Database Connection created in this script
Given database-connection with id "<dbs_uid_number>" is active
And that I want to delete a resource with the key "dbs_uid" stored in session array as variable "dbs_uid_<dbs_uid_number>"
And I request "project/<project>/database-connection"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "object"
Examples:
Examples:
| project | dbs_uid_number |
| 106912358530c9b14ac15d3001790900 | 1 |
| 1265557095225ff5c688f46031700471 | 2 |
| project | dbs_uid_number |
| 74737540052e1641ab88249082085472 | 1 |
| 87648819953a85c0abc01d3080475981 | 2 |
Scenario Outline: Get the DataBase Connections List when there are exactly zero DataBase Connections
Given database-connection with id "<dbs_uid_number>" is active
And I request "project/<project>/database-connections"
Then the response status code should be 200
And the response charset is "UTF-8"
And the response has <record> record
# GET /api/1.0/{workspace}/project/<project-id>/database-connection
# Get DataBase Connections list
Scenario Outline: Get the DataBase Connections List when there are exactly zero DataBase Connections
Given database-connection with id "<dbs_uid_number>" is active
And I request "project/<project>/database-connections"
Then the response status code should be 200
And the response charset is "UTF-8"
And the response has <record> record
Examples:
| test_description | project | record | dbs_uid_number |
| List DB in the process Data Base Connenctions .pm | 74737540052e1641ab88249082085472 | 0 | 1 |
| List DB in the process testExecutionOfDerivationScreen .pmx | 87648819953a85c0abc01d3080475981 | 0 | 2 |
Examples:
| project | record | dbs_uid_number |
| 106912358530c9b14ac15d3001790900 | 0 | 1 |
| 1265557095225ff5c688f46031700471 | 0 | 2 |

View File

@@ -5,8 +5,8 @@ Feature: DataBase Connections Negative Tests
Given that I have a valid access_token
Scenario Outline: Test database connection to test
Given POST this data:
"""
Given POST this data:
"""
{
"dbs_type": "<dbs_type>",
"dbs_server": "<dbs_server>",
@@ -18,35 +18,38 @@ Feature: DataBase Connections Negative Tests
"dbs_description": "<dbs_description>"
}
"""
And I request "project/<project>/database-connection"
Then the response status code should be <error_code>
And the response status message should have the following text "<error_message>"
And I request "project/<project>/database-connection"
Then the response status code should be <error_code>
And the response status message should have the following text "<error_message>"
Examples:
| test_description | project | dbs_type | dbs_server | dbs_database_name | dbs_username | dbs_password | dbs_encode | dbs_description | error_code | error_message |
| Field required dbs_type | 74737540052e1641ab88249082085472 | | michelangelo-be.colosa.net | test | testuser | sample | utf8 | mysql connection | 400 | dbs_type |
| Field required dbs_server | 74737540052e1641ab88249082085472 | mysql | | test | testuser | sample | utf8 | mysql connection | 400 | dbs_server |
| Field required dbs_database_name | 74737540052e1641ab88249082085472 | mysql | michelangelo-be.colosa.net | | testuser | sample | utf8 | mysql connection | 400 | dbs_database_name |
| Field required dbs_encode | 74737540052e1641ab88249082085472 | mysql | michelangelo-be.colosa.net | test | testuser | sample | | mysql connection | 400 | dbs_encode |
| Field required project | | mysql | michelangelo-be.colosa.net | test | testuser | sample | utf8 | mysql connection | 400 | prj_uid |
Examples:
| test_description | project | dbs_type | dbs_server | dbs_database_name | dbs_username | dbs_password | dbs_port | dbs_encode | dbs_description | error_code | error_message |
| Field required dbs_type | 74737540052e1641ab88249082085472 | | <mys_db_server> | <mys_db_name> | <mys_db_username> | <mys_db_password> | <mys_db_port> | <mys_db_encode> | mysql connection | 400 | dbs_type |
| Field required dbs_server | 74737540052e1641ab88249082085472 | <mys_db_type> | | <mys_db_name> | <mys_db_username> | <mys_db_password> | <mys_db_port> | <mys_db_encode> | mysql connection | 400 | dbs_server |
| Field required dbs_database_name | 74737540052e1641ab88249082085472 | <mys_db_type> | <mys_db_server> | | <mys_db_username> | <mys_db_password> | <mys_db_port> | <mys_db_encode> | mysql connection | 400 | dbs_database_name |
| Field required dbs_encode | 74737540052e1641ab88249082085472 | <mys_db_type> | <mys_db_server> | <mys_db_name> | <mys_db_username> | <mys_db_password> | <mys_db_port> | | mysql connection | 400 | dbs_encode |
| Field required project | | <mys_db_type> | <mys_db_server> | <mys_db_name> | <mys_db_username> | <mys_db_password> | <mys_db_port> | <mys_db_encode> | mysql connection | 400 | prj_uid |
Scenario: Test database connection to test with parameter wrong port
Given POST this data:
"""
{
"dbs_type": "mysql",
"dbs_server": "michelangelo-be.colosa.net",
"dbs_database_name": "test",
"dbs_username": "testuser",
"dbs_password": "sample",
"dbs_port": 10000,
"dbs_encode": "utf8",
"dbs_description": "mysql connection"
Scenario Outline: Test database connection to test with parameter wrong port
Given POST this data:
"""
{
"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 400
And the response status message should have the following text "port"
And I request "project/74737540052e1641ab88249082085472/database-connection"
Then the response status code should be 400
And the response status message should have the following text "port"
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> |
| <mys_db_type> | <mys_db_server> | <mys_db_name> | <mys_db_username> | <mys_db_password> | <mys_db_port> | <mys_db_encode> | <mys_db_description> |