Skip to content
Snippets Groups Projects
Commit 35fc6c3f authored by Jorge Moratinos's avatar Jorge Moratinos
Browse files

updated documentation

parent e9908619
No related branches found
No related tags found
1 merge request!8Ocf doc4 upgrade documentation with new tests
......@@ -24,14 +24,17 @@ Please check parameters (include) under *Test Execution* at [Manual Build And Te
### Mock Server
Some tests on Test Plans require mockserver. That mock server must be deployed and reachable by Robot Framework and CCF under test.
If you want to launch only tests that not needed mockserver, just add "--exclude mockserver" parameter to robot execution.
If you want to launch only tests that not needed mockserver, just add "--exclude mockserver" parameter to robot execution:
```
./runCapifTests.sh --include <TAG> --exclude mockserver
```
## Manual Build And Test Execution
* **Build Robot docker image**:
```
cd tools/robot
docker build . -t 5gnow-robot-test:latest
docker build . -t capif-robot-test:latest
```
* **Tests Execution**:
......@@ -40,11 +43,34 @@ Execute all tests locally:
```
<PATH_TO_REPOSITORY>=path in local machine to repository cloned.
<PATH_RESULT_FOLDER>=path to a folder on local machine to store results of Robot Framework execution.
<CAPIF_HOSTNAME>=Is the hostname set when run.sh is executed, by default it will be capifcore.
<CAPIF_HOSTNAME>=Is the hostname set when run.sh is executed, by default it is capifcore.
<CAPIF_HTTP_PORT>=This is the port to reach when robot framework want to reach CAPIF deployment using http, this should be set to port without TLS set on Nginx, 8080 by default.
<CAPIF_HTTPS_PORT>=This is the port to be used when we want to use https connection, this should be set to port with TLS set on Nginx, 443 by default
<CAPIF_REGISTER>=This is the hostname of register service deployed. By default it is register.
<CAPIF_REGISTER_PORT>=This is the port to be used to reach register service deployed. By default it is 8084.
<CAPIF_VAULT>=This is the hostname of vault service. By default it is vault.
<CAPIF_VAULT_PORT>=This is the port to be used to reach vault service. By default it is 8200.
<CAPIF_VAULT_TOKEN>=Vault token to be used on request through vault. By default it is "read-ca-token".
<MOCK_SERVER_URL>=Setup Mock server url to be used in notifications at tests marked with mockserver tag. By default it is not set.
To execute all tests run :
docker run -ti --rm --network="host" -v <PATH_TO_REPOSITORY>/tests:/opt/robot-tests/tests -v <PATH_RESULT_FOLDER>:/opt/robot-tests/results 5gnow-robot-test:latest --variable CAPIF_HOSTNAME:capifcore --variable CAPIF_HTTP_PORT:8080 --include all
docker run -ti --rm --network="host" \
--add-host host.docker.internal:host-gateway \
--add-host vault:host-gateway \
--add-host register:host-gateway \
--add-host mockserver:host-gateway \
-v <PATH_TO_REPOSITORY>/tests:/opt/robot-tests/tests \
-v <PATH_RESULT_FOLDER>:/opt/robot-tests/results capif-robot-test:latest \
--variable CAPIF_HOSTNAME:$CAPIF_HOSTNAME \
--variable CAPIF_HTTP_PORT:$CAPIF_HTTP_PORT \
--variable CAPIF_HTTPS_PORT:$CAPIF_HTTPS_PORT \
--variable CAPIF_REGISTER:$CAPIF_REGISTER \
--variable CAPIF_REGISTER_PORT:$CAPIF_REGISTER_PORT \
--variable CAPIF_VAULT:$CAPIF_VAULT \
--variable CAPIF_VAULT_PORT:$CAPIF_VAULT_PORT \
--variable CAPIF_VAULT_TOKEN:$CAPIF_VAULT_TOKEN \
--variable MOCK_SERVER_URL:$MOCK_SERVER_URL \
--include all
```
Execute specific tests locally:
......@@ -62,7 +88,23 @@ To run more specific tests, for example, only one functionality:
"capif_security_api
And Run:
docker run -ti --rm --network="host" -v <PATH_TO_REPOSITORY>/tests:/opt/robot-tests/tests -v <PATH_RESULT_FOLDER>:/opt/robot-tests/results 5gnow-robot-test:latest --variable CAPIF_HOSTNAME:capifcore --variable CAPIF_HTTP_PORT:8080 --include <TAG>
docker run -ti --rm --network="host" \
--add-host host.docker.internal:host-gateway \
--add-host vault:host-gateway \
--add-host register:host-gateway \
--add-host mockserver:host-gateway \
-v <PATH_TO_REPOSITORY>/tests:/opt/robot-tests/tests \
-v <PATH_RESULT_FOLDER>:/opt/robot-tests/results capif-robot-test:latest \
--variable CAPIF_HOSTNAME:$CAPIF_HOSTNAME \
--variable CAPIF_HTTP_PORT:$CAPIF_HTTP_PORT \
--variable CAPIF_HTTPS_PORT:$CAPIF_HTTPS_PORT \
--variable CAPIF_REGISTER:$CAPIF_REGISTER \
--variable CAPIF_REGISTER_PORT:$CAPIF_REGISTER_PORT \
--variable CAPIF_VAULT:$CAPIF_VAULT \
--variable CAPIF_VAULT_PORT:$CAPIF_VAULT_PORT \
--variable CAPIF_VAULT_TOKEN:$CAPIF_VAULT_TOKEN \
--variable MOCK_SERVER_URL:$MOCK_SERVER_URL \
--include <TAG>
```
## Test result review
......
......@@ -258,7 +258,7 @@ At this documentation you will have all information and related files and exampl
---
## Test Case 6: Invoker receives Service API Invocation events
**Test ID**: ***capif_api_events-6***
**Test ID**: ***capif_api_events-6***, ***mockserver***
**Description**:
......@@ -331,7 +331,7 @@ At this documentation you will have all information and related files and exampl
---
## Test Case 7: Invoker subscribe to Service API Available and Unavailable events
**Test ID**: ***capif_api_events-7***
**Test ID**: ***capif_api_events-7***, ***mockserver***
**Description**:
......@@ -404,7 +404,7 @@ At this documentation you will have all information and related files and exampl
---
## Test Case 8: Invoker subscribe to Service API Update
**Test ID**: ***capif_api_events-8***
**Test ID**: ***capif_api_events-8***, ***mockserver***
**Description**:
......@@ -473,7 +473,7 @@ At this documentation you will have all information and related files and exampl
---
## Test Case 9: Provider subscribe to API Invoker events
**Test ID**: ***capif_api_events-9***
**Test ID**: ***capif_api_events-9***, ***mockserver***
**Description**:
......@@ -537,7 +537,7 @@ At this documentation you will have all information and related files and exampl
---
## Test Case 10: Provider subscribed to ACL update event
**Test ID**: ***capif_api_events-10***
**Test ID**: ***capif_api_events-10***, ***mockserver***
**Description**:
......@@ -607,7 +607,7 @@ At this documentation you will have all information and related files and exampl
---
## Test Case 11: Provider receives an ACL unavailable event when invoker remove Security Context.
**Test ID**: ***capif_api_events-11***
**Test ID**: ***capif_api_events-11***, ***mockserver***
**Description**:
......@@ -681,7 +681,7 @@ At this documentation you will have all information and related files and exampl
---
## Test Case 12: Invoker receives an Invoker Authorization Revoked and ACL unavailable event when Provider revoke Invoker Authorization.
**Test ID**: ***capif_api_events-12***
**Test ID**: ***capif_api_events-12***, ***mockserver***
**Description**:
......
......@@ -32,6 +32,8 @@ The steps to register a new user at Register Service are:
* Include **basic Auth Header with User credentials**
* Retrieve **access_token** and the urls needed for next requests from response body [user_getauth_response_body_example]
![Flow](../../../images/flows/03_Register_of_AEF_GetAuth.png)
## Onboard an Invoker
### Steps to perform operation
......@@ -64,6 +66,8 @@ The steps to register a new user at Register Service are:
* onboardingInformation->apiInvokerCertificate must contain the public key signed.
3. Response Header **Location** must be received with URI to new resource created, following this structure: *{apiRoot}/api-invoker-management/{apiVersion}/onboardedInvokers/{onboardingId}*
### Example Flow
![Flow](../../../images/flows/07_Invoker_Onboarding.png)
## Register a Provider
......@@ -98,6 +102,8 @@ The steps to register a new user at Register Service are:
2. **apiProvCert** under **regInfo** is set properly
4. Location Header must contain the new resource URL *{apiRoot}/api-provider-management/v1/registrations/{registrationId}*
### Example Flow
![Flow](../../../images/flows/07_Invoker_Onboarding.png)
[user_registration_body]: ./user_registration_body.json "User Registration Body"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment