Logo: Relish

  1. Sign in

Project: Living-documentation-demo

Genealogy - APS Definitions/Find-By-Name

   A Robot should be able to interact with Find-By-Name service of APS Definitions namespace using XYZ API
Scenarios
  • @positive
  • @setup
  • @acceptance
Create a new APS
Given
XYZ API domain, APS definitions namespace and username "[email protected]" with password "aut"
When
Robot requests service name "create"
And
uses XML-file "CreateNewAPS.xml"
And
uses HTTP method "POST"
Then
Robot should see response status "success"
  • @positive
  • @setup
  • @acceptance
Validate the previous scenario that "PREFIX-APS" was created
Given
XYZ API domain, APS definitions namespace and username "[email protected]" with password "aut"
When
Robot requests service name "find-by-name"
And
with "name" parameter "PREFIX-APS"
And
uses HTTP method "GET"
Then
Robot should see response status "success"
And
returned node "aps-definition" should contain following attributes:
name
PREFIX-APS
And
returned node "aps-definition" should contain following attributes:
tlp-name
QC1 TLP
  • @negative
Provide incorrect namespace (i.e. "aps-definition" instead of "aps-definitions")
Given
XYZ API domain and authorized user
And
namespace "/incorrect namespace/"
When
Robot requests service name "find-by-name"
And
with "name" parameter "PREFIX-APS"
And
uses HTTP method "GET"
Then
Robot should see response status "failure"
And
Robot should see error type "NoSuchNamespace"
And
Robot should see msg "No such namespace"
  • @negative
Provide incorrect service name (i.e. "find-by-names" instead of "find-by-name")
Given
XYZ API domain, APS definitions namespace and username "[email protected]" with password "aut"
When
Robot requests service name "find-by-names"
And
with "name" parameter "PREFIX-APS"
And
uses HTTP method "GET"
Then
Robot should see response status "failure"
And
Robot should see error type "NoSuchService"
And
Robot should see msg "No service exists with name: find-by-names"
  • @negative
Provide incomplete request (required parameter name= is missing)
Given
XYZ API domain, APS definitions namespace and username "[email protected]" with password "aut"
When
Robot requests service name "find-by-name"
And
uses HTTP method "GET"
Then
Robot should see response status "failure"
And
Robot should see error type "RequiredParameter"
And
Robot should see msg "Missing required parameter [null]"
  • @negative
Provide incomplete request (value for required parameter name= is missing, blank)
Given
XYZ API domain, APS definitions namespace and username "[email protected]" with password "aut"
When
Robot requests service name "find-by-name"
And
with "name" parameter ""
And
uses HTTP method "GET"
Then
Robot should see response status "failure"
And
Robot should see error type "RequiredParameter"
And
Robot should see msg "Missing required parameter [null]"
  • @negative
Provide incorrect parameter name("names" instead of "name")
Given
XYZ API domain, APS definitions namespace and username "[email protected]" with password "aut"
When
Robot requests service name "find-by-name"
And
with "names" parameter "PREFIX-APS"
And
uses HTTP method "GET"
Then
Robot should see response status "failure"
And
Robot should see error type "RequiredParameter"
And
Robot should see msg "Missing required parameter [null]"
  • @negative
Find non existing APS
Given
XYZ API domain, APS definitions namespace and username "[email protected]" with password "aut"
When
Robot requests service name "find-by-name"
And
with "name" parameter "A1A2A3A4A5A6"
And
uses HTTP method "GET"
Then
Robot should see response status "failure"
And
Robot should see error type "NoSuchAPSName"
And
Robot should see msg "No such APS defined with name 'A1A2A3A4A5A6'"
  • @negative
Find APS using "*" - wild character
Given
XYZ API domain, APS definitions namespace and username "[email protected]" with password "aut"
When
Robot requests service name "find-by-name"
And
with "name" parameter "PREFIX-*"
And
uses HTTP method "GET"
Then
Robot should see response status "failure"
And
Robot should see error type "NoSuchAPSName"
And
Robot should see msg "No such APS defined with name 'PREFIX-*'"
  • @negative
Find APS and use incorrect HTTP Method POST instead of GET
Given
XYZ API domain, APS definitions namespace and username "[email protected]" with password "aut"
When
Robot requests service name "find-by-name"
And
with "name" parameter "PREFIX-APS"
And
uses HTTP method "POST"
Then
Robot should see response status "failure"
And
Robot should see error type "GetRequired"
And
Robot should see msg "Unsupported HTTP method (expected GET) : GET"
  • @positive
  • @acceptance
Find existing APS
Given
XYZ API domain, APS definitions namespace and username "[email protected]" with password "aut"
When
Robot requests service name "find-by-name"
And
with "name" parameter "PREFIX-APS"
And
uses HTTP method "GET"
Then
Robot should see response status "success"
And
returned node "aps-definition" should contain following attributes:
name
PREFIX-APS
And
returned node "aps-definition" should contain following attributes:
tlp-name
QC1 TLP
And
returned node "aps-definition.part-definitions.part-definition" should contain following attributes:
family
QC PRODUCT FAMILY 1
And
returned node "aps-definition.part-definitions.part-definition" should contain following attributes:
part-number
QC1-C1
And
returned node "aps-definition.part-definitions.part-definition" should contain following attributes:
version
V1
And
returned node "aps-definition.part-definitions.part-definition" should contain following attributes:
revision
R1
And
returned node "aps-definition.part-definitions.part-definition" should contain following attributes:
count
1
And
returned node "aps-definition.part-definitions.part-definition" should contain following attributes:
lot-based
false
And
returned node "aps-definition.part-definitions.part-definition.children.part-definition" should contain following attributes:
family
QC PRODUCT FAMILY 1
And
returned node "aps-definition.part-definitions.part-definition.children.part-definition" should contain following attributes:
part-number
QC1-C1A
And
returned node "aps-definition.part-definitions.part-definition.children.part-definition" should contain following attributes:
version
V1
And
returned node "aps-definition.part-definitions.part-definition.children.part-definition" should contain following attributes:
revision
R1
And
returned node "aps-definition.part-definitions.part-definition.children.part-definition" should contain following attributes:
count
1
And
returned node "aps-definition.part-definitions.part-definition.children.part-definition" should contain following attributes:
lot-based
false
And
returned node "attribute-definitions.attribute-definition" should contain following attributes:
name
color
And
returned node "attribute-definitions.attribute-definition" should contain following attributes:
data-type
String
And
returned node "attribute-definitions.attribute-definition" should contain following attributes:
required
false
  • @positive
  • @cleanup
  • @acceptance
Delete existing APS
Given
XYZ API domain, APS definitions namespace and username "[email protected]" with password "aut"
When
Robot requests service name "delete"
And
with "name" parameter "PREFIX-APS"
And
uses HTTP method "POST"
Then
Robot should see response status "success"
  • @positive
  • @cleanup
  • @acceptance
Validate the previous scenario that APS was deleted
Given
XYZ API domain, APS definitions namespace and username "[email protected]" with password "aut"
When
Robot requests service name "find-by-name"
And
with "name" parameter "PREFIX-APS"
And
uses HTTP method "GET"
Then
Robot should see response status "failure"
And
Robot should see error type "NoSuchAPSName"
And
Robot should see msg "No such APS defined with name 'PREFIX-APS'"

Last published almost 7 years ago by dabravolski.