The oauth2 tests troubles were solved putting the right token generated and put the correct input data.
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Generate token Grant type - Authorization Code
|
||||
Requirements:
|
||||
Requirements:
|
||||
a workspace with open session and installed application
|
||||
|
||||
|
||||
Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
||||
# OAUTH /en/neoclassic/oauth2
|
||||
# In order to generate a new token create a new CLIENT_ID and CLIENT_SECRET
|
||||
Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET in order to generate a new token
|
||||
Given OAUTH register an application
|
||||
"""
|
||||
{
|
||||
@@ -18,12 +20,13 @@ Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
||||
Examples:
|
||||
|
||||
| Description | application_number | application_name | application_description | application_website | application_redirectUri |
|
||||
| Create token normal | 1 | Demo3 | Demo3 desc | http://www.processmaker.com | http://michelangelo-be.colosa.net/sysmichelangelo/en/neoclassic/oauth2/grant |
|
||||
| Create token normal | 2 | Demo4 | Demo4 desc | http://www.processmaker.com | http://michelangelo-be.colosa.net/sysmichelangelo/en/neoclassic/oauth2/grant |
|
||||
| Create token normal | 1 | Behat1 | Behat1 desc | http://www.processmaker.com | http://michelangelo-be.colosa.net/sysmichelangelo/en/neoclassic/oauth2/grant |
|
||||
| Create token normal | 2 | Behat2 | Behat2 desc | http://www.processmaker.com | http://michelangelo-be.colosa.net/sysmichelangelo/en/neoclassic/oauth2/grant |
|
||||
|
||||
|
||||
#Endpoint para verificar el correcto funcionamiento del token generado en este script
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
# GET /api/1.0/{workspace}/project/<project>/output-documents
|
||||
# Endpoint para verificar el correcto funcionamiento del token generado en este script
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 200
|
||||
@@ -34,25 +37,26 @@ Scenario Outline: Get the Output Documents List both process
|
||||
And the "out_doc_title" property in row 0 equals "<out_doc_title>"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | project | records | out_doc_title | application_number |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 |
|
||||
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process (without valid token)
|
||||
# GET /api/1.0/{workspace}/project/<project>/output-documents
|
||||
# Endpoint para verificar el correcto funcionamiento del token generado en este script
|
||||
Scenario Outline: Get the Output Documents List both process (without valid token)
|
||||
Given I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | project | records | out_doc_title | application_number |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 |
|
||||
|
||||
|
||||
#Endpoint para hacer que expire los token creados en este script
|
||||
Scenario Outline: Expire token created in this script
|
||||
# POST /en/neoclassic/oauth2/access_token/expire
|
||||
# Endpoint para hacer que expire los token creados en este script
|
||||
Scenario Outline: Expire token created in this script
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -62,28 +66,28 @@ Scenario Outline: Expire token created in this script
|
||||
Then the response status code should be 200
|
||||
|
||||
Examples:
|
||||
|
||||
| Description | application_number |
|
||||
| Expire token 1 | 1 |
|
||||
| Expire token 2 | 2 |
|
||||
|
||||
|
||||
#Endpoint para verificar que el token haya expirado
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
# GET /api/1.0/{workspace}/project/<project>/output-documents
|
||||
# Endpoint para verificar que el token haya expirado
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||
|
||||
|
||||
#Grant type Refresh Token
|
||||
Scenario Outline: Refresh token
|
||||
# POST /en/neoclassic/oauth2/refresh_token_<grant_number>
|
||||
# Grant type Refresh Token
|
||||
Scenario Outline: Refresh token
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -101,14 +105,14 @@ Scenario Outline: Refresh token
|
||||
And store "scope" in session array as variable "scope_<refresh_token_number>"
|
||||
|
||||
Examples:
|
||||
|
||||
| Description | grant_number | refresh_token_number |
|
||||
| Create token normal | 1 | 3 |
|
||||
| Create token normal | 2 | 4 |
|
||||
|
||||
|
||||
#Endpoint para verificar el correcto funcionamiento del Refresh Token generado en este script
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
# GET /api/1.0/{workspace}/project/<project>/output-documents
|
||||
# Endpoint para verificar el correcto funcionamiento del Refresh Token generado en este script
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 200
|
||||
@@ -119,15 +123,14 @@ Scenario Outline: Get the Output Documents List both process
|
||||
And the "out_doc_title" property in row 0 equals "<out_doc_title>"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | project | records | out_doc_title | application_number |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 3 |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 4 |
|
||||
|
||||
|
||||
#Endpoint para borrar el token creado en este script
|
||||
|
||||
Scenario Outline: Delete all tokens created previously in this script
|
||||
# DELETE /en/neoclassic/oauth2
|
||||
# Endpoint para borrar el token creado en este script
|
||||
Scenario Outline: Delete all tokens created previously in this script
|
||||
Given that I want to delete a resource with the key "access_token_<application_number>" stored in session array
|
||||
And I request "oauth2"
|
||||
And the content type is "application/json"
|
||||
@@ -136,7 +139,6 @@ Scenario Outline: Delete all tokens created previously in this script
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
|
||||
| application_number |
|
||||
| 1 |
|
||||
| 2 |
|
||||
@@ -144,15 +146,15 @@ Scenario Outline: Delete all tokens created previously in this script
|
||||
| 4 |
|
||||
|
||||
|
||||
#Endpoint para verificar que el token ya no existe
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
# GET /api/1.0/{workspace}/project/<project>/output-documents
|
||||
# Endpoint para verificar que el token ya no existe
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||
@@ -1,10 +1,10 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Generate token Grant type - Client Credentials Grant
|
||||
Requirements:
|
||||
Requirements:
|
||||
a workspace with installed application
|
||||
|
||||
|
||||
Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
||||
Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -27,20 +27,19 @@ Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
||||
|
||||
|
||||
#Endpoint para verificar el correcto funcionamiento del token generado en este script especificamente en la opción Running Cases
|
||||
Scenario Outline: Returns a list of the cases for the logged in user (Inbox)
|
||||
Scenario Outline: Returns a list of the cases for the logged in user (Inbox)
|
||||
Given that I assign an access token from session variable "access_token_<grant_number>"
|
||||
And I request "cases"
|
||||
Then the response status code should be 400
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
|
||||
Examples:
|
||||
| Description | grant_number |
|
||||
| Create token normal | 1 |
|
||||
| Create token normal | 2 |
|
||||
|
||||
#Endpoint para hacer que expire los token creados en este script
|
||||
Scenario Outline: Expire token created in this script
|
||||
Scenario Outline: Expire token created in this script
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -54,7 +53,7 @@ Scenario Outline: Expire token created in this script
|
||||
| Expire token 1 | 1 |
|
||||
|
||||
|
||||
Scenario Outline: Expire token created in this script
|
||||
Scenario Outline: Expire token created in this script
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -69,7 +68,7 @@ Scenario Outline: Expire token created in this script
|
||||
|
||||
|
||||
#Endpoint para verificar que el token haya expirado
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
@@ -80,7 +79,7 @@ Scenario Outline: Get the Output Documents List both process
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
@@ -93,7 +92,7 @@ Scenario Outline: Get the Output Documents List both process
|
||||
|
||||
#Endpoint para borrar el token creado en este script
|
||||
|
||||
Scenario Outline: Delete all tokens created previously in this script
|
||||
Scenario Outline: Delete all tokens created previously in this script
|
||||
Given that I want to delete a resource with the key "access_token_<application_number>" stored in session array
|
||||
And I request "oauth2"
|
||||
And the content type is "application/json"
|
||||
@@ -108,7 +107,7 @@ Scenario Outline: Delete all tokens created previously in this script
|
||||
| 2 |
|
||||
|
||||
#Endpoint para verificar que el token ya no existe
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
@@ -119,7 +118,7 @@ Scenario Outline: Get the Output Documents List both process
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Generate token Grant type - Implicit Grant
|
||||
Requirements:
|
||||
Requirements:
|
||||
a workspace with installed application
|
||||
|
||||
|
||||
Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
||||
Scenario Outline: Create a new implicit token through CLIENT_ID and CLIENT_SECRET
|
||||
Given OAUTH request implicit grant
|
||||
"""
|
||||
{
|
||||
@@ -21,7 +21,7 @@ Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
||||
|
||||
|
||||
#Endpoint para verificar el correcto funcionamiento del token generado en este script especificamente en la opción Running Cases
|
||||
Scenario Outline: Returns a list of the cases for the logged in user (Inbox)
|
||||
Scenario Outline: Returns a list of the cases for the logged in user (Inbox)
|
||||
Given that I assign an access token from session variable "access_token_<implicit_grant_number>"
|
||||
And I request "cases"
|
||||
Then the response status code should be 200
|
||||
@@ -35,7 +35,7 @@ Scenario Outline: Returns a list of the cases for the logged in user (Inbox)
|
||||
| Create token normal | 2 |
|
||||
|
||||
#Endpoint para hacer que expire los token creados en este script
|
||||
Scenario Outline: Expire token created in this script
|
||||
Scenario Outline: Expire token created in this script
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -49,7 +49,7 @@ Scenario Outline: Expire token created in this script
|
||||
| Expire token 1 | 1 |
|
||||
|
||||
|
||||
Scenario Outline: Expire token created in this script
|
||||
Scenario Outline: Expire token created in this script
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -64,7 +64,7 @@ Scenario Outline: Expire token created in this script
|
||||
|
||||
|
||||
#Endpoint para verificar que el token haya expirado
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
@@ -75,7 +75,7 @@ Scenario Outline: Get the Output Documents List both process
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
@@ -88,7 +88,7 @@ Scenario Outline: Get the Output Documents List both process
|
||||
|
||||
#Endpoint para borrar el token creado en este script
|
||||
|
||||
Scenario Outline: Delete all tokens created previously in this script
|
||||
Scenario Outline: Delete all tokens created previously in this script
|
||||
Given that I want to delete a resource with the key "access_token_<application_number>" stored in session array
|
||||
And I request "oauth2"
|
||||
And the content type is "application/json"
|
||||
@@ -103,7 +103,7 @@ Scenario Outline: Delete all tokens created previously in this script
|
||||
| 2 |
|
||||
|
||||
#Endpoint para verificar que el token ya no existe
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
@@ -114,7 +114,7 @@ Scenario Outline: Get the Output Documents List both process
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
@@ -1,10 +1,10 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Generate token Grant type - Resources Owner Password Credential Grant
|
||||
Requirements:
|
||||
Requirements:
|
||||
a workspace with installed application
|
||||
|
||||
|
||||
Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
||||
Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -33,7 +33,7 @@ Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
||||
|
||||
|
||||
#Endpoint para verificar el correcto funcionamiento del token generado en este script especificamente en la opción Running Cases
|
||||
Scenario Outline: Returns a list of the cases for the logged in user (Inbox)
|
||||
Scenario Outline: Returns a list of the cases for the logged in user (Inbox)
|
||||
Given that I assign an access token from session variable "access_token_<grant_number>"
|
||||
And I request "cases"
|
||||
Then the response status code should be 200
|
||||
@@ -48,7 +48,7 @@ Scenario Outline: Returns a list of the cases for the logged in user (Inbox)
|
||||
|
||||
|
||||
#Endpoint para hacer que expire los token creados en este script
|
||||
Scenario Outline: Expire token created in this script
|
||||
Scenario Outline: Expire token created in this script
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -62,7 +62,7 @@ Scenario Outline: Expire token created in this script
|
||||
| Expire token 1 | 1 |
|
||||
|
||||
|
||||
Scenario Outline: Expire token created in this script
|
||||
Scenario Outline: Expire token created in this script
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -77,7 +77,7 @@ Scenario Outline: Expire token created in this script
|
||||
|
||||
|
||||
#Endpoint para verificar que el token haya expirado
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
@@ -88,7 +88,7 @@ Scenario Outline: Get the Output Documents List both process
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
@@ -101,7 +101,7 @@ Scenario Outline: Get the Output Documents List both process
|
||||
|
||||
#Endpoint para borrar el token creado en este script
|
||||
|
||||
Scenario Outline: Delete all tokens created previously in this script
|
||||
Scenario Outline: Delete all tokens created previously in this script
|
||||
Given that I want to delete a resource with the key "access_token_<application_number>" stored in session array
|
||||
And I request "oauth2"
|
||||
And the content type is "application/json"
|
||||
@@ -116,7 +116,7 @@ Scenario Outline: Delete all tokens created previously in this script
|
||||
| 2 |
|
||||
|
||||
#Endpoint para verificar que el token ya no existe
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
@@ -127,7 +127,7 @@ Scenario Outline: Get the Output Documents List both process
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
|
||||
Reference in New Issue
Block a user