...
Manual testing with Postman
Build cps-and-ncmp docker image for version to be tested. From Run maven from cps repo directory:
Code Block language bash mvn clean install -Pcps-ncmp-docker
Change Edit docker-compose.yml to filter notifications: set NOTIFICATION_DATASPACE_FILTER_PATTERNS: ' to NON-EXISTING-DATASPACE'
Code Block language yml cps-and-ncmp: environment: notification.enabled: 'true' NOTIFICATION_DATASPACE_FILTER_PATTERNS: 'NON-EXISTING-DATASPACE'
Start docker-compose with DMI plugin stub and monitoring enabled:
Code Block language bash docker-compose -f docker-compose/docker-compose.yml --profile dmi-stub --profile monitoring up
Wait for CPS to
be initializedstart. Console output will show:
Code Block language text cps-and-ncmp | {"logTimeStamp":"2023-03-24T16:20:36.705Z","logLevel":"INFO","principalId":"cpsuser","serviceName":"cps-application","message":"Started Application in 47.336 seconds (JVM running for 48.444)","processId":"1","threadName":"main","class":"org.onap.cps.Application"}
- Test using Postman
- Start Postman, and import this collection.the NCMP de-register performance postman collection
- Click the new collection, and open the "Variables" tab.
- Change the current value of TOTAL_CMHANDLES to the desired value, e.g. 10000Click , and click the "Save" button.
- Select "Register CM handles", and click "Send". (The Postman collection will use a script to automatically create the request body.)
- Wait until all CM handles are in READY state.
This will be done by running this a query on the database.
Here are instructions using the postgresql command line interface, but you may alternatively use the Postgres GUI client.- Open a new terminal window
Run psql command to connect to the database (default password is cps):
Code Block psql -h localhost -p 5432 cpsdb cps Password for user cps: psql (14.6 (Ubuntu 14.6-0ubuntu0.22.04.1), server 14.1) Type "help" for help. cpsdb=#
Run the following query to count the number of handles in the READY state. You will need to repeat this command, until all are ready (e.g. 10000).
Code Block cpsdb=# SELECT count(*) FROM public.fragment where attributes @> '{"cm-handle-state": "READY"}'; count ------- 2384 (1 row) cpsdb=# SELECT count(*) FROM public.fragment where attributes @> '{"cm-handle-state": "READY"}'; count ------- 10000 (1 row)
- Now that all CM handles are ready, we can proceed to test de-registration. Go back to Postman.
- Select "De-Register CM handles", and click "Send"
- Record the time taken
- Start Postman, and import this collection.the NCMP de-register performance postman collection
...
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
hidden | true |
---|
...
Stop docker-compose:
Code Block language bash docker-compose -f docker-compose/docker-compose.yml down
Clean up docker containers and volumes:
Code Block language bash docker container prune -f && docker volume prune -f
Automated testing
TODO