Policy R7 Guilin CSIT/External Lab Functional Test Cases

CSIT and Testsuite Tests

Triggered by merges in policy/distribution

https://gerrit.onap.org/r/gitweb?p=integration/csit.git;a=blob;f=tests/policy/distribution/distribution-test.robot;h=2b1c6d64eb6eebf878e8795b9db0704e26bf5e5f;hb=refs/heads/master

Test Case Id

Description

Pre-conditions

Test Steps

Expected Results

CSIT/External Lab

Test Case Id

Description

Pre-conditions

Test Steps

Expected Results

CSIT/External Lab

1

Perform healthcheck of the component

Policy distribution docker image is available

API – healthcheck

Method - GET

Endpoint: https://<host>:6969/policy/distribution/v1/healthcheck

The component should return health status as “true”

CSIT - DONE

External Lab

2

Query component for statistics

Policy distribution docker image is available

API - statistics

Method - GET

Endpoint: https://<host>:6969/policy/distribution/v1/statistics

The component should return the current statistics of the component.

CSIT - DONE

3

InvokeDistributionUsingFile And RunEventOnApexEngine

Apex PDP docker image is available

API – apex/FirstConsumer/EventIn

Method - PUT

Endpoint:

https://<apex-pdp>:6969//apex/FirstConsumer/EventIn

Apex PDP returns 200

CSIT - DONE













Triggered by merges in policy/pap

https://gerrit.onap.org/r/gitweb?p=integration/csit.git;a=blob;f=tests/policy/pap/pap-test.robot;h=67a578281ba8032a5926fbed5baf28890d1a427e;hb=refs/heads/master

Test Case Id

Description

Pre-conditions

Test Steps

Expected Results

CSIT/External Lab

Test Case Id

Description

Pre-conditions

Test Steps

Expected Results

CSIT/External Lab

1

Perform all component Healthcheck

PAP docker image is available

API - component healthcheck

METHOD - GET

Endpoint: https://<host>:6969/policy/pap/v1/components/healthcheck


CSIT - 200 but only the pap should return "healthy" since not all the components are running.

TESTSUITE: 200 and all components should return "healthy"

CSIT - TBD

Testsuite - INT-1509: Change Policy Health Check to support new HealthCheck APIClosed

1

Perform healthcheck 

PAP docker image is available

API – healthcheck

Method - GET

Endpoint: https://<host>:6969/policy/pap/v1/healthcheck

The component should return health status as “true”

CSIT - DONE

External Lab

2

Query component for statistics

PAP docker image is available

API - statistics

Method - GET

Endpoint: https://<host>:6969/policy/pap/v1/statistics

The component should return the current statistics of the component.

CSIT - DONE

External Lab

3

Query pdp group information

PAP docker image is available

API - pdps

Method - GET

Endpoint: https:{url}:{port}/policy/pap/v1/pdps

The component should return the list of PDP groups and subgroups together with the policies that are deployed on each PDP group and subgroup.

CSIT - DONE

4

Create PDP group & subgroup

PAP docker image is available

API - pdps

Method - POST

Endpoint: https:{url}:{port}/policy/pap/v1/pdps

The component should create the relevant PDP group & subgroup in the database and return with operation success message/code.

CSIT - DONE

5

Create a Policy

API docker image is available

APIpolicytypes/onap.policies.Monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies

Method - POST

Endpoint: http://<host>:6969/policy/api/v1/policytypes/onap.policies.Monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies

The Policy API should return code 201 and message "A new policy has been successfully created."

CSIT - DONE

6

Deploy policy to PDP group & subgroup

PAP docker image is available

API docker image is available

DMaaP simulator docker image is needed; a PDP can be simulated using curl



API - pdps

Method - POST

Endpoint: https:{url}:{port}/policy/pap/v1/pdps

The component should map the relevant policies with the corresponding PDP group & subgroup in database. Deploy the policy in relevant PDP and return with operation success message/code.

CSIT - DONE

7

UNDeploy policy to PDP group & subgroup

PAP docker image is available

API docker image is available

NOTE: PDP's not needed for this test.

API - pdps

Method - POST

Endpoint: https:{url}:{port}/policy/pap/v1/pdps

Based on test #5 - undeploy those policies

CSIT - DONE

8

DeactivatePdpGroup

PAP docker image is available

API docker image is available

API - pdps/groups

Method - PUT

Endpoint: https:{url}:{port}//policy/pap/v1/pdps/groups/create.group.request?state=PASSIVE

PAP should return 200

CSIT - DONE

9

DeletePdpGroups

PAP docker image is available

API docker image is available

API - pdps/groups

Method - DELETE

Endpoint: https:{url}:{port}//policy/pap/v1/pdps/groups/create.group.request

PAP should return 200

CSIT - DONE

10

QueryPdpGroupsAfterDelete

PAP docker image is available

API docker image is available

API - pdps

Method - GET

Endpoint: https:{url}:{port}//policy/pap/v1/pdps

PAP should return 200

CSIT - DONE



Triggered by merges in policy/drools-pdp

https://gerrit.onap.org/r/gitweb?p=integration/csit.git;a=blob;f=tests/policy/drools-pdp/drools-pdp-test.robot;h=cf4d3ceac87dde285d997a3885ebb49bc4f16cb9;hb=refs/heads/master

Test Case Id

Description

Pre-conditions

Test Steps

Expected Results

CSIT/External Labs

Test Case Id

Description

Pre-conditions

Test Steps

Expected Results

CSIT/External Labs

1

Alive

Verify that a PDP-D with no applications comes alive

API – telemetry

Method - GET

Endpoint: https://<host>:9696/policy/pdpd/v1/engine

Verify alive field

CSIT-DONE



Triggered by merges in policy/drools-applications

https://gerrit.onap.org/r/gitweb?p=integration/csit.git;a=blob;f=tests/policy/drools-applications/drools-applications-test.robot;h=c3586cfa9d54daf6829cba3dc27bc81b56e8d24d;hb=refs/heads/master

Test Case Id

Description

Pre-conditions

Test Steps

Expected Results

CSIT/External Labs

Test Case Id

Description

Pre-conditions

Test Steps

Expected Results

CSIT/External Labs

1

Alive

Verify that the PDP-D + Control Loop Apps come alive

API – telemetry

Method - GET

Endpoint: https://<host>:9696/policy/pdp/engine

Verify alive field is set to 'true'

CSIT - DONE

2

Healthcheck

Verify that the PDP-D + Control Loop Apps passes healthchecks

API – telemetry

Method - GET

Endpoint: https://<host>:6969/healthcheck

Verify that the healthy field at the root object is set to 'true'

CSIT - DONE

3

Usecases

Verify that the PDP-D + Control Loop Apps - Usecases controller has been successfully brought up

API – telemetry

Method - GET

Endpoint: https://<host>:6969/policy/pdp/engine/controllers/frankfurt/drools/facts

Verify that a 200 OK is received indicating that there is a drools session associated with this controller that has been successfully instantiated.

CSIT - DONE

4

vFW

Verify vFW use case.

Simulators should be installed.

  1. Add vFW Operational Policy

  2. Inject ONSET

  3. Trace the vFW use case across the complete sequence of messages

Verify vFirewall completes successfully

CSIT - DONE

5

vDNS

Verify Scale out use case.

Simulators should be installed.

  1. Add vDNS Operational Policy

  2. Inject ONSET

  3. Trace the vDNS use case across complete sequence of messages

Verify scale out completes successfully

CSIT - DONE

6

vCPE

Verify vCPE use case.

Simulators should be installed.

  1. Add vCPE Operational Policy

  2. Inject ONSET

  3. Trace the vCPE use case across the complete sequence of messages

Verify vCPE completes successfully

CSIT - DONE

Triggered by merges in policy/xacml-pdp

https://gerrit.onap.org/r/gitweb?p=integration/csit.git;a=blob;f=tests/policy/xacml-pdp/xacml-pdp-test.robot;h=0305af8e9fd2ba91d5711680f3be28efb829b37e;hb=refs/heads/master

Test Case Id

Description

Pre-conditions

Test Steps

Expected Results

CSIT/External Lab

Test Case Id

Description

Pre-conditions

Test Steps

Expected Results

CSIT/External Lab

1

Health Check

Xacml-PDP docker image available

API – healthcheck

Method - GET

Endpoint: http://<host>:6969/policy/pdpx/v1/healthcheck

The component should return health status as “true”

Status code 200

CSIT - DONE

External Lab

2

Statistics

Xacml-PDP docker image available

API – statistics

Method - GET

Endpoint: http://<host>:6969/policy/pdpx/v1/statistics

The Xacml PDP should return statistics report consisting of 0 policies loaded and 0 decisions

Status code 200



CSIT - DONE

3

ExecuteXacmlPolicy









3a

CreateNewMonitorPolicy

API docker image available

API /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0/policies

Method - POST

Endpoint: http://<host>:6969/policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0/policies

The Policy API should return code 201 and message "A new policy has been successfully created."

CSIT - DONE

3b

DeployMonitorPolicy

Xacml-PDP and PAP docker images available

Policy created on the PAP

API – deployPolicy

Method - POST

Endpoint: http://<host>:6969/policy/pdpx/v1/deployPolicy

Successfully deploy a policy to the XACML PDP

Statistics should increment policy count

Status code 201

CSIT - DONE

3c

GetAbbreviatedDecisionResult

Xacml-PDP docker image available

Test Case 4 success

API – decision

Method - POST

Endpoint: http://<host>:6969/policy/pdpx/v1/decision?abbrev=true

The Xacml PDP should return a Decision object containing the decision and abbreviated policy results

Status code 200

CSIT - DONE













3d

GetDecision

Xacml-PDP docker image available

Test Case 5 success

API – decision

Method - POST

Endpoint: http://<host>:6969/policy/pdpx/v1/decision

The Xacml PDP should return a Decision object containing the decision

Status code 200

CSIT - DONE

External Lab (stretch)



Triggered by merges in policy/apex-pdp

https://gerrit.onap.org/r/gitweb?p=integration/csit.git;a=blob;f=tests/policy/apex-pdp/apex-pdp-test.robot;h=9956731d585a7d0ef7157a8c73c41e9888e70cdb;hb=refs/heads/master

Test Case Id

Description

Pre-conditions

Test Steps

Expected Results

CSIT/External Labs

Test Case Id

Description

Pre-conditions

Test Steps

Expected Results

CSIT/External Labs

1

Perform healthcheck of the component



Apex PDP docker image is available

API – healthcheck

Method - GET

Endpoint: https://<host>:6969/policy/apex-pdp/v1/healthcheck

The component should return health status as “true”

Status code 200

CSIT - DONE

External Lab

2

ExecuteApexPolicy





















2b

CreatePolicy

API docker image available

API – policy/api/v1/policytypes/onap.policies.native.Apex/versions/1.0.0/policies

Method - POST

Endpoint: http://<host>:6969/policy/api/v1/policytypes/onap.policies.native.Apex/versions/1.0.0/policies

200

CSIT - DONE

External Lab

2c

DeployPolicy

APEX-PDP and PAP docker images available

DMaaP Simulator available.

Policy created 

API – pdps/deployments/batch

Method - POST

Endpoint: http://<host>:6969/policy/pap/v1/pdps/deployments/batch

200

CSIT - DONE

External Lab

2d

RunEventOnApexEngine

APEX-PDP docker image available

2c succeeds

API – /apex/FirstConsumer/EventIn

Method - POST

Endpoint: http://<APEX_IP>:23324/apex/FirstConsumer/EventIn

200

CSIT - DONE

External Lab



3

Query component for statistics

Apex PDP docker image is available

API - statistics

Method - GET

Endpoint: https://<host>:6969/policy/apex-pdp/v1/statistics

The component should return the current statistics of the component.

CSIT (Stretch)

Triggered by merges in policy/api

https://gerrit.onap.org/r/gitweb?p=integration/csit.git;a=blob;f=tests/policy/api/api-test.robot;h=76c1bdc6fd5096d2cb3d65300494dd5abd872c2b;hb=refs/heads/master



Test Case Id

Description

Pre-conditions

Test Steps

Expected Results

CSIT External Labs

Test Case Id

Description

Pre-conditions

Test Steps

Expected Results

CSIT External Labs

1

Healthcheck

Perform healthcheck for policy design API service



  • Policy API docker image available

API – healthcheck

Method - GET

Endpoint: http://<host>:6969/policy/api/v1/healthcheck

200

CSIT - DONE

External Lab

2

Statistics

Retrieve statistics of policy design API invocation

  • Policy API docker image available

API – statistics

Method - GET

Endpoint: http://<host>:6969/policy/api/v1/statistics

200

CSIT - DONE

External Lab

3

RetrievePolicyTypes

Retrieve pre-loaded generic policy types

  • Policy API docker image available

API – policytypes

Method - GET

Endpoint: http://<host>:6969/policy/api/v1/policytypes

200 - all preloaded policy types

CSIT - DONE

4

CreateTCAPolicyTypeV1

  • Policy API docker image available

API – policytypes

Method - GET

Endpoint: http://<host>:6969/policy/api/v1/policytypes

406 - policy type v1 is already preloaded

CSIT - DONE

5

CreateTCAPolicyTypeV2

  • Policy API docker image available

API – policytypes

Method - GET

Endpoint: http://<host>:6969/policy/api/v1/policytypes

200 - v2 created

CSIT - DONE

6

RetrieveMonitoringPolicyTypes

  • Policy API docker image available

API – policytypes

Method - GET

Endpoint: http://<host>:6969/policy/api/v1/policytypes

200 - both v1 and v2 retrieved

CSIT - DONE

7

CreateNewMonitoringPolicyV1

Create a new TCA policy type for DCAE TCA microservice

  • Policy API docker image available

  • DCAE TCA ms policy type is not created yet

API – policytypes

Method - POST

Endpoint: http://<host>:6969/

/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies

200

CSIT - DONE

8

SimpleCreateNewMonitoringPolicyV1

Trying to create an existing policy with any change and same version should cause error.

  • Policy API docker image available

  • DCAE TCA ms policy type v1 is created

/policy/api/v1/policies

406 - must supply new version

CSIT - DONE

9

SimpleCreateNewMonitoringPolicyV2

Create a new Monitoring TCA policiy version 2 using simple endpoint



/policy/api/v1/policies

200 - v2 created

CSIT - DONE

10

RetrievePoliciesOfType

Retrieve Monitoring related policy types

  • Policy API docker image available

  • DCAE TCA ms policy type v1 and v2 are created

API – policytypes/onap.policies.Monitoring

Method - GET

Endpoint: http://<host>:6969/

/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies

200 - contains both v1 and v2

CSIT - DONE

11, 12

DeleteSpecificPolicy

Delete the Monitoring Policy Version 1 of the TCA Policy Type

  • Policy API docker image available

  • DCAE TCA ms policy type v1 and v2 are created

/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies/onap.restart.tca/versions/1.0.0

200 - delete successful

404 - not found on 2nd delete attempt

CSIT - DONE

13, 14

DeleteSpecificPolicyV2

Delete the Monitoring Policy Version 2 of the TCA Policy Type

  • Policy API docker image available

  • DCAE TCA ms policy type v2 is created

/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies/onap.restart.tca/versions/2.0.0

200 - delete successful

404 - not found on 2nd delete attempt

CSIT - DONE

15, 16

DeleteSpecificPolicyTypeV1

  • Policy API docker image available

  • DCAE TCA ms policy type v1 is created

/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0

200 - delete successful

404 - not found on 2nd delete attempt

CSIT - DONE

17, 18

DeleteSpecificPolicyTypeV2

  • Policy API docker image available

  • DCAE TCA ms policy type v2 is created

/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0

200 - delete successful

404 - not found on 2nd delete attempt

CSIT - DONE



Pairwise Testing

POLICY Pair Wise Testing for Guilin Release

Stability and Performance Testing

POLICY-2708: Run S3P stability and resiliency testsClosed

Results will be documented in the readthedocs: https://docs.onap.org/projects/onap-policy-parent/en/latest/development/devtools/devtools.html#running-the-stability-performance-tests