Skip to content
Snippets Groups Projects
Commit e0d2aa54 authored by Rosen Georgiev's avatar Rosen Georgiev
Browse files

Merge branch 'connectionManager' into 'main'

Added for tests for the attestation, plus negative tests

See merge request !15
parents c6f1fa3c 0ed881be
Branches
No related tags found
1 merge request!15Added for tests for the attestation, plus negative tests
Pipeline #52507 failed
Showing
with 738 additions and 4 deletions
...@@ -6,5 +6,79 @@ ...@@ -6,5 +6,79 @@
"schemaID": "123456", "schemaID": "123456",
"createdBy": "acceptsAnyString", "createdBy": "acceptsAnyString",
"expiryHours": "24" "expiryHours": "24"
},
"missing_name": {
"isRevokable": false,
"isAutoIssue": false,
"schemaID": "123456",
"createdBy": "acceptsAnyString",
"expiryHours": "24"
},
"missing_isRevokable": {
"name": "Automation_CredDef_001",
"isAutoIssue": false,
"schemaID": "123456",
"createdBy": "acceptsAnyString",
"expiryHours": "24"
},
"missing_isAutoIssue": {
"name": "Automation_CredDef_001",
"isRevokable": false,
"schemaID": "123456",
"createdBy": "acceptsAnyString",
"expiryHours": "24"
},
"missing_createdBy": {
"name": "Automation_CredDef_001",
"isRevokable": false,
"isAutoIssue": false,
"schemaID": "123456",
"expiryHours": "24"
},
"missing_schemaID": {
"name": "Automation_CredDef_001",
"isRevokable": false,
"isAutoIssue": false,
"createdBy": "acceptsAnyString",
"expiryHours": "24"
},
"missing_expiryHours": {
"name": "Automation_CredDef_001",
"isRevokable": false,
"isAutoIssue": false,
"schemaID": "123456",
"createdBy": "acceptsAnyString"
},
"empty_name": {
"name": "",
"isRevokable": false,
"isAutoIssue": false,
"schemaID": "123456",
"createdBy": "acceptsAnyString",
"expiryHours": "24"
},
"empty_schemaID": {
"name": "Automation_CredDef_001",
"isRevokable": false,
"isAutoIssue": false,
"schemaID": "",
"createdBy": "acceptsAnyString",
"expiryHours": "24"
},
"empty_createdBy": {
"name": "Automation_CredDef_001",
"isRevokable": false,
"isAutoIssue": false,
"schemaID": "123456",
"createdBy": "",
"expiryHours": "24"
},
"empty_expiryHours": {
"name": "Automation_CredDef_001",
"isRevokable": false,
"isAutoIssue": false,
"schemaID": "123456",
"createdBy": "acceptsAnyString",
"expiryHours": ""
} }
} }
\ No newline at end of file
...@@ -7,5 +7,78 @@ ...@@ -7,5 +7,78 @@
"gender" "gender"
], ],
"createdBy": "2344789247389" "createdBy": "2344789247389"
},
"missing_name": {
"attributes": [
"fName",
"lName",
"gender"
],
"createdBy": "2344789247389"
},
"missing_attributes": {
"name": "automation_testing_schema1-01",
"createdBy": "2344789247389"
},
"missing_createdBy": {
"name": "automation_testing_schema1-01",
"attributes": [
"fName",
"lName",
"gender"
]
},
"empty_name": {
"name": "",
"attributes": [
"fName",
"lName",
"gender"
],
"createdBy": "2344789247389"
},
"empty_attributes": {
"name": "automation_testing_schema1-01",
"attributes": [
],
"createdBy": "2344789247389"
},
"empty_createdBy": {
"name": "automation_testing_schema1-01",
"attributes": [
"fName",
"lName",
"gender"
],
"createdBy": ""
},
"empty_version": {
"name": "automation_testing_schema1-01",
"attributes": [
"fName",
"lName",
"gender"
],
"createdBy": "2344789247389",
"version": ""
},
"missing_version": {
"name": "automation_testing_schema1-01",
"attributes": [
"fName",
"lName",
"gender"
],
"createdBy": "2344789247389"
},
"wrong_format_version": {
"name": "automation_testing_schema1-01",
"attributes": [
"fName",
"lName",
"gender"
],
"createdBy": "2344789247389",
"version": "1123131"
} }
} }
\ No newline at end of file
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"statusCode": {
"type": "integer"
},
"message": {
"type": "string"
},
"data": {
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"records": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"credentialId": {
"type": "string"
},
"credDefId": {
"type": "string"
},
"threadId": {
"type": "string"
},
"state": {
"type": "string"
},
"principalDid": {
"type": "string"
},
"connectionId": {
"type": "string"
},
"createdDate": {
"type": "string"
},
"updatedDate": {
"type": "string"
},
"expirationDate": {
"type": "string"
}
},
"required": [
"id",
"credentialId",
"credDefId",
"threadId",
"state",
"principalDid",
"connectionId",
"createdDate",
"updatedDate",
"expirationDate"
]
}
]
}
},
"required": [
"count",
"records"
]
}
},
"required": [
"statusCode",
"message",
"data"
]
}
\ No newline at end of file
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"statusCode": {
"type": "integer"
},
"message": {
"type": "string"
},
"data": {
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"records": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"schemaID": {
"type": "string"
},
"name": {
"type": "string"
},
"credDefId": {
"type": "string"
},
"isAutoIssue": {
"type": "boolean"
},
"isRevokable": {
"type": "boolean"
},
"expiryHours": {
"type": "string"
},
"createdBy": {
"type": "string"
},
"createdDate": {
"type": "string"
},
"updatedBy": {
"type": "string"
},
"updatedDate": {
"type": "string"
}
},
"required": [
"id",
"schemaID",
"name",
"credDefId",
"isAutoIssue",
"isRevokable",
"expiryHours",
"createdBy",
"createdDate",
"updatedBy",
"updatedDate"
]
}
]
}
},
"required": [
"count",
"records"
]
}
},
"required": [
"statusCode",
"message",
"data"
]
}
\ No newline at end of file
...@@ -187,4 +187,69 @@ public class AttestationStepDefinitions extends BaseStepDefinitions { ...@@ -187,4 +187,69 @@ public class AttestationStepDefinitions extends BaseStepDefinitions {
I_create_an_offer_credential_via_OCM_Api(); I_create_an_offer_credential_via_OCM_Api();
} }
@Given("^I get a credential definition with credDefId \\{(.*?)\\} via OCM Api")
public void I_get_a_credential_definition_with_credDefId_via_OCM_Api(String credDef) {
currentRequest.setPath("/attestation/v1/credentialDef/" + credDef);
Response response = RestClient.get(currentRequest);
addRequest(currentRequest);
addResponse(response);
}
@Given("^I get current Credential definition via OCM API")
public void I_get_current_Credential_definition_via_OCM_API() {
I_get_a_credential_definition_with_credDefId_via_OCM_Api(restSessionContainer.getCurrentCredentialDef().getData().getCredDefId());
}
@Given("^I accept request by providing credentialid \\{(.*?)\\} via OCM Api")
public void I_accept_request_by_providing_credentialid__via_OCM_Api(String credentialId) {
currentRequest.setPath("/attestation/v1/accept-request?credentialId=" + credentialId);
Response response = RestClient.post(currentRequest);
addRequest(currentRequest);
addResponse(response);
}
@Given("^I accept request for the current credentialId via OCM Api")
public void I_accept_request_for_the_current_credentialId_via_OCM_Api() {
I_accept_request_by_providing_credentialid__via_OCM_Api(restSessionContainer.getCurrentCredentialDef().getData().getCredDefId());
}
@Given("^I get all credentials via OCM Api")
public void I_get_all_credentials_via_OCM_Api() {
currentRequest.setPath("/attestation/v1/credential");
Response response = RestClient.get(currentRequest);
addRequest(currentRequest);
addResponse(response);
}
@Given("^I get all credentials with pageSize \\{(.*?)\\} and page \\{(.*?)\\} via OCM api")
public void I_get_all_credentials_with_pageSize_and_page_via_OCM_api(String pageSize,String page) {
HashMap<String, String> queryParams = new HashMap<>();
queryParams.put("pageSize",pageSize);
queryParams.put("page",page);
currentRequest.setQueryParams(queryParams);
I_get_all_credentials_via_OCM_Api();
}
@Given("^I get a credential definition with schemaID \\{(.*?)\\} via OCM Api")
public void I_get_a_credential_definition_with_schemaID_via_OCM_Api(String schemaID) {
currentRequest.setPath("/attestation/v1/credentialDef?schemaID=" + schemaID);
Response response = RestClient.get(currentRequest);
addRequest(currentRequest);
addResponse(response);
}
@Given("^I get a credential definition with the current schemaID via OCM Api")
public void I_get_a_credential_definition_with_the_current_schemaID_via_OCM_Api() {
currentRequest.setPath("/attestation/v1/credentialDef?schemaID=" + restSessionContainer.getCurrentSchema().getData().getSchemaID());
Response response = RestClient.get(currentRequest);
addRequest(currentRequest);
addResponse(response);
}
} }
\ No newline at end of file
...@@ -115,4 +115,13 @@ public class ConnectionStepDefinitions extends BaseStepDefinitions { ...@@ -115,4 +115,13 @@ public class ConnectionStepDefinitions extends BaseStepDefinitions {
addRequest(currentRequest); addRequest(currentRequest);
addResponse(response); addResponse(response);
} }
@Given("^an administrator fetches the current connection via OCM Api")
public void an_administrator_fetches_the_current_connection_via_OCM_Api() {
currentRequest.setPath("/connection/v1/connections/" + restSessionContainer.getCurrentConnection().getData().getConnection().getId());
Response response = RestClient.get(currentRequest);
addRequest(currentRequest);
addResponse(response);
}
} }
\ No newline at end of file
#Copyright (c) 2018 Vereign AG [https://www.vereign.com]
#
#This is free software: you can redistribute it and/or modify
#it under the terms of the GNU Affero General Public License as
#published by the Free Software Foundation, either version 3 of the
#License, or (at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU Affero General Public License for more details.
#
#You should have received a copy of the GNU Affero General Public License
#along with this program. If not, see <http://www.gnu.org/licenses/>.
#http://localhost/ocm/attestation/v1/accept-request?credentialId=:credentialDef
#Author: Rosen Georgiev rosen.georgiev@vereign.com
#NOTE: Cannot be tested without PCM to receive an Credential Offer
@rest @all @ocm @attestation
Feature: API - OCM - attestation - v1 - accept-request POST
It is used to accept the acknowledgement received from another Aries agent
for the issuance for Verifiable Credential and send Verifiable Credential.
Background:
Given we are testing the OCM Api
@cred @wip
Scenario: OCM - Attestation - Creation of credential definition based on a newly created schema - Positive
#Creation of the schema
Given I load the REST request {AttestationCreateSchemas.json} with profile {successful_creation}
Then I create a new schema with random version via Attestation Manager in OCM api
Then the field {statusCode} contains the value {201}
And the status code should be {201}
#Creation of the Credential definition
And I clear the request body
Given I load the REST request {AttestationCreateCredentialDef.json} with profile {successful_creation}
Then I create a new credential definition with the current schemaId via OCM Api
And the status code should be {201}
#Trying to accept a newly created Credential Def without being offered and approved by PCM
And I clear the request body
Given I accept request for the current credentialId via OCM Api
And the status code should be {201}
\ No newline at end of file
#Copyright (c) 2018 Vereign AG [https://www.vereign.com]
#
#This is free software: you can redistribute it and/or modify
#it under the terms of the GNU Affero General Public License as
#published by the Free Software Foundation, either version 3 of the
#License, or (at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU Affero General Public License for more details.
#
#You should have received a copy of the GNU Affero General Public License
#along with this program. If not, see <http://www.gnu.org/licenses/>.
#http://localhost/ocm/attestation/v1/credential
#Author: Rosen Georgiev rosen.georgiev@vereign.com
@rest @all @ocm @attestation
Feature: API - OCM - attestation - v1 - credential GET
This request fetches the issued verifiable credentials.
It uses pagination to provide the particular number of records filtered as per the input given.
Background:
Given we are testing the OCM Api
@cred
Scenario: OCM - Attestation - Get all Credentials - Positive
Then I get all credentials via OCM Api
And the status code should be {200}
And the field {statusCode} contains the value {200}
And the field {message} contains the value {Credential fetch successfully}
And the response is valid according to the {Attestation_GET_credential.json} REST schema
@cred
Scenario: OCM - Attestation - Get all Credentials with pagination without any records - Positive
Then I get all credentials with pageSize {9999} and page {9999} via OCM api
And the status code should be {200}
And the field {statusCode} contains the value {200}
And the field {message} contains the value {Credential fetch successfully}
And the response is valid according to the {Attestation_GET_credential.json} REST schema
And the field {$.data.records} contains {0} elements
@cred
Scenario: OCM - Attestation - Get all Credentials with pagination for just 5 records - Positive
Then I get all credentials with pageSize {5} and page {0} via OCM api
And the status code should be {200}
And the field {statusCode} contains the value {200}
And the field {message} contains the value {Credential fetch successfully}
And the response is valid according to the {Attestation_GET_credential.json} REST schema
And the field {$.data.records} contains {5} elements
\ No newline at end of file
#Copyright (c) 2018 Vereign AG [https://www.vereign.com]
#
#This is free software: you can redistribute it and/or modify
#it under the terms of the GNU Affero General Public License as
#published by the Free Software Foundation, either version 3 of the
#License, or (at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU Affero General Public License for more details.
#
#You should have received a copy of the GNU Affero General Public License
#along with this program. If not, see <http://www.gnu.org/licenses/>.
#http://localhost/ocm/attestation/v1/credentialDef?schemaID=:schemaID
#Author: Rosen Georgiev rosen.georgiev@vereign.com
@rest @all @ocm @attestation
Feature: API - OCM - attestation - v1 - credentialDef - :schemaID GET
This request fetches the created credentials against provided schema_id.
It uses pagination to provide the particular number of records filtered as per the input given.
Background:
Given we are testing the OCM Api
@cred
Scenario: OCM - Attestation - Get credentialDef with SchemaID - Positive
#Creation of the schema
Given I load the REST request {AttestationCreateSchemas.json} with profile {successful_creation}
Then I create a new schema with random version via Attestation Manager in OCM api
And the status code should be {201}
#Creation of the Credential definition
And I clear the request body
Given I load the REST request {AttestationCreateCredentialDef.json} with profile {successful_creation}
Then I create a new credential definition with the current schemaId via OCM Api
And the status code should be {201}
#Get Credential Definitions via SchemaID
And I clear the request body
Given I get a credential definition with the current schemaID via OCM Api
And the status code should be {200}
And the response is valid according to the {Attestation_GET_credentialDef.json} REST schema
Then the field {statusCode} contains the value {200}
Then the field {message} contains the value {Credential definitions fetch successfully}
Then the field {$..name} contains the value {Automation_CredDef_001}
Then the field {$.data.count} contains the value {1}
Then the field {$.data.records} contains the value {1}
@cred
Scenario: OCM - Attestation - Create 2 Credential Def with the same Schema and then GET it - Positive
#Creation of the schema
Given I load the REST request {AttestationCreateSchemas.json} with profile {successful_creation}
Then I create a new schema with random version via Attestation Manager in OCM api
And the status code should be {201}
#Creation of the Credential definition
And I clear the request body
Given I load the REST request {AttestationCreateCredentialDef.json} with profile {successful_creation}
Then I create a new credential definition with the current schemaId via OCM Api
And the status code should be {201}
#Creation of 2nd Credential definition with the same schemaID
Given I set the request fields
| name | Automation_CredDef_002 |
Then I create a new credential definition via OCM Api
And the status code should be {201}
#Get Credential Definitions via SchemaID
And I clear the request body
Given I get a credential definition with the current schemaID via OCM Api
And the status code should be {200}
And the response is valid according to the {Attestation_GET_credentialDef.json} REST schema
Then the field {statusCode} contains the value {200}
Then the field {message} contains the value {Credential definitions fetch successfully}
Then the field {$.data.count} contains the value {2}
Then the field {$..name} contains the value {Automation_CredDef_001}
Then the field {$..name} contains the value {Automation_CredDef_002}
Then the field {$.data.records} contains the value {2}
@cred @negative
Scenario: OCM - Attestation - Try to get Credential Definition with non existant schemaID- Negative
Given I get a credential definition with schemaID {test1234} via OCM Api
Then the field {statusCode} contains the value {404}
And the status code should be {404}
Then the field {message} contains the value {Credential definitions fetch successfully}
\ No newline at end of file
...@@ -44,4 +44,64 @@ Feature: API - OCM - attestation - v1 - credentialDef POST ...@@ -44,4 +44,64 @@ Feature: API - OCM - attestation - v1 - credentialDef POST
And the field {$.data.isAutoIssue} contains the value {false} And the field {$.data.isAutoIssue} contains the value {false}
And the field {$.data.isRevokable} contains the value {false} And the field {$.data.isRevokable} contains the value {false}
And the field {$.data.expiryHours} contains the value {24} And the field {$.data.expiryHours} contains the value {24}
And the field {$.data.name} contains the value {Automation_CredDef_001}
\ No newline at end of file @cred @negative
Scenario Outline: OCM - Attestation - Try to create a credential def with invalid data <json> - Negative
Given I load the REST request {AttestationCreateCredentialDef.json} with profile {<json>}
Then I create a new credential definition via OCM Api
And the status code should be {400}
And the field {message} contains the value {Credential definition required following attributes ( schemaID, name, isRevokable, isAutoIssue, createdBy, expiryHours )}
And the field {statusCode} contains the value {400}
Examples:
| json |
| missing_name |
| missing_isRevokable |
| missing_isAutoIssue |
| missing_createdBy |
| missing_schemaID |
| missing_expiryHours |
| empty_name |
| empty_schemaID |
| empty_createdBy |
| empty_expiryHours |
@cred @negative
Scenario: OCM - Attestation - Try to create 2nd credential def with the same SchemaID and same name - Negative
#Creation of the schema
Given I load the REST request {AttestationCreateSchemas.json} with profile {successful_creation}
Then I create a new schema with random version via Attestation Manager in OCM api
And the status code should be {201}
#Creation of the Credential definition
And I clear the request body
Given I load the REST request {AttestationCreateCredentialDef.json} with profile {successful_creation}
Then I create a new credential definition with the current schemaId via OCM Api
And the status code should be {201}
#Creation of 2nd Credential definition with the same schemaID
Then I create a new credential definition via OCM Api
And the status code should be {409}
And the field {statusCode} contains the value {409}
And the field {message} contains the value {Credential definition already exists}
@cred
Scenario: OCM - Attestation - Create a second Credential Definition under the same schema with different name - Positive
#Creation of the schema
Given I load the REST request {AttestationCreateSchemas.json} with profile {successful_creation}
Then I create a new schema with random version via Attestation Manager in OCM api
And the status code should be {201}
#Creation of the Credential definition
And I clear the request body
Given I load the REST request {AttestationCreateCredentialDef.json} with profile {successful_creation}
Then I create a new credential definition with the current schemaId via OCM Api
And the status code should be {201}
#Creation of 2nd Credential definition with the same schemaID
Given I set the request fields
| name | Automation_CredDef_002 |
Then I create a new credential definition via OCM Api
And the status code should be {201}
And the response is valid according to the {Attestation_POST_credentialDef.json} REST schema
And the field {message} contains the value {Credential definition created successfully}
And the field {statusCode} contains the value {201}
And the field {$.data.name} contains the value {Automation_CredDef_002}
And the field {$.data.isAutoIssue} contains the value {false}
And the field {$.data.isRevokable} contains the value {false}
And the field {$.data.expiryHours} contains the value {24}
#Copyright (c) 2018 Vereign AG [https://www.vereign.com]
#
#This is free software: you can redistribute it and/or modify
#it under the terms of the GNU Affero General Public License as
#published by the Free Software Foundation, either version 3 of the
#License, or (at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU Affero General Public License for more details.
#
#You should have received a copy of the GNU Affero General Public License
#along with this program. If not, see <http://www.gnu.org/licenses/>.
#http://localhost/ocm/attestation/v1/credentialDef/:credentialDef
#Author: Rosen Georgiev rosen.georgiev@vereign.com
@rest @all @ocm @attestation
Feature: API - OCM - attestation - v1 - credentialDef - :credentialDefId GET
This request is used to fetch credential definitions for the provided cred_def_id in URL.
Background:
Given we are testing the OCM Api
@cred
Scenario: OCM - Attestation - Get the newly created CredentialDef - Positive
#Creation of the schema
Given I load the REST request {AttestationCreateSchemas.json} with profile {successful_creation}
Then I create a new schema with random version via Attestation Manager in OCM api
Then the field {statusCode} contains the value {201}
And the status code should be {201}
#Creation of the Credential definition
And I clear the request body
Given I load the REST request {AttestationCreateCredentialDef.json} with profile {successful_creation}
Then I create a new credential definition with the current schemaId via OCM Api
And the status code should be {201}
#Get the newly created Credential Definition
And I clear the request body
Then I get current Credential definition via OCM API
And the status code should be {200}
And the field {statusCode} contains the value {200}
And the response is valid according to the {Attestation_GET_credentialDef.json} REST schema
@cred @negative
Scenario: OCM - Attestation - Try to get a credential def with invalid id - Positive
Then I get a credential definition with credDefId {invalidCredDefId} via OCM Api
And the status code should be {404}
And the field {statusCode} contains the value {404}
And the field {message} contains the value {No Data found}
\ No newline at end of file
...@@ -40,4 +40,44 @@ Feature: API - OCM - attestation - v1 - schemas POST ...@@ -40,4 +40,44 @@ Feature: API - OCM - attestation - v1 - schemas POST
And the field {$..attribute..name} contains the value {fName} And the field {$..attribute..name} contains the value {fName}
And the field {$..attribute..name} contains the value {lName} And the field {$..attribute..name} contains the value {lName}
And the field {$..attribute..name} contains the value {gender} And the field {$..attribute..name} contains the value {gender}
And the field {$..attribute..name} contains the value {expirationDate} And the field {$..attribute..name} contains the value {expirationDate}
\ No newline at end of file
@schemas @negative
Scenario: OCM - Attestation - Try to create a new schema with existing version - Negative
Given I load the REST request {AttestationCreateSchemas.json} with profile {successful_creation}
Then I create a new schema with random version via Attestation Manager in OCM api
Then the field {statusCode} contains the value {201}
And the status code should be {201}
Given I create a new schema via Attestation Manager in OCM api
And the status code should be {409}
And the field {statusCode} contains the value {409}
And the field {message} contains the value {Schema already exists}
@schemas @negative
Scenario Outline: OCM - Attestation - Try to create a new schema with invalid data <json> - Negative
Given I load the REST request {AttestationCreateSchemas.json} with profile {<json>}
Then I create a new schema with random version via Attestation Manager in OCM api
Then the field {statusCode} contains the value {400}
And the status code should be {400}
And the field {message} contains the value {Schema required following attributes ( name, createdBy, version, attributes )}
Examples:
| json |
| missing_name |
| missing_attributes |
| missing_createdBy |
| empty_name |
| empty_attributes |
| empty_createdBy |
@schemas @negative
Scenario Outline: OCM - Attestation - Try to create a new schema with invalid version <json> - Negative
Given I load the REST request {AttestationCreateSchemas.json} with profile {<json>}
Then I create a new schema via Attestation Manager in OCM api
Then the field {statusCode} contains the value {400}
And the status code should be {400}
And the field {message} contains the value {Schema required following attributes ( name, createdBy, version, attributes )}
Examples:
| json |
| empty_version |
| missing_version |
| wrong_format_version |
\ No newline at end of file
...@@ -34,4 +34,11 @@ Feature: API - OCM - attestation - v1 - schemas - :schemaID GET ...@@ -34,4 +34,11 @@ Feature: API - OCM - attestation - v1 - schemas - :schemaID GET
And the status code should be {200} And the status code should be {200}
And the response is valid according to the {Attestation_GET_schemas.json} REST schema And the response is valid according to the {Attestation_GET_schemas.json} REST schema
And the field {message} contains the value {Schema fetch successfully} And the field {message} contains the value {Schema fetch successfully}
And the field {$.data.count} contains the value {1} And the field {$.data.count} contains the value {1}
\ No newline at end of file
@schemas @negative
Scenario: OCM - Attestation - Try to get schema by providing invalid schemaID - Positive
Given I get schema with schemaID {test12313} via OCM Api
Then the field {statusCode} contains the value {404}
And the status code should be {404}
And the field {message} contains the value {No Data found}
\ No newline at end of file
...@@ -24,6 +24,19 @@ Feature: API - OCM - connection - v1 - connections - connectionId GET ...@@ -24,6 +24,19 @@ Feature: API - OCM - connection - v1 - connections - connectionId GET
Background: Background:
Given we are testing the OCM Api Given we are testing the OCM Api
@connection
Scenario: OCM - Creating a new process connection with alias <alias>- Positive
#Create a new member process connection
Given an administrator generates a QR code by creating a connection with alias {member} via OCM api
Then the field {statusCode} contains the value {200}
And the status code should be {201}
#Get the current Connection
Given an administrator fetches the current connection via OCM Api
Then the field {statusCode} contains the value {200}
And the status code should be {200}
Then the field {message} contains the value {Connections fetch successfully}
Then the field {$.data.records.status} contains the value {invited}
@connections @negative @connections @negative
Scenario Outline: OCM - Try to get connection by providing invalid connectionID - <connId> - Negative Scenario Outline: OCM - Try to get connection by providing invalid connectionID - <connId> - Negative
Given an administrator fetches connection with connectionId {<connId>} Given an administrator fetches connection with connectionId {<connId>}
...@@ -31,4 +44,5 @@ Feature: API - OCM - connection - v1 - connections - connectionId GET ...@@ -31,4 +44,5 @@ Feature: API - OCM - connection - v1 - connections - connectionId GET
Then the field {message} contains the value {No Data found} Then the field {message} contains the value {No Data found}
Examples: Examples:
| connId | | connId |
| dasdasdas | | dasdasdas |
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment